Package com.projity.configuration

Examples of com.projity.configuration.ReportColumns


  public void generateDesign(SpreadSheetFieldArray fieldArray) throws JRException {
    hasAggregableField = false;
    generateBaseDesign();
    ArrayList columnsList = (ArrayList) reportDefinition.getColumnsList();

    ReportColumns columns;
    if(columnsList.size() == 1) {
      // simple flat report
      SpreadSheetFieldArray fields;
      if (fieldArray != null)
        fields =  fieldArray;
      else {
        columns = (ReportColumns)columnsList.get(0);
        fields = columns.getFieldArray();
     
      addFields(fields);
     
      if(hasAggregableField) {
        addAggregableFields(fields,null);
      }
     
      jasperDesign.setPageHeader(getFieldsHeader(fields, false));
     
      jasperDesign.setDetail(getDetail(fields, null));
     
      addPageFooter();
     
      // last page footer (if any)
      if(hasAggregableField) {
        addLastPageFooter(fields);
      }
     
//      int neededW = neededWidth(fields);
//      System.out.println("Needed width is " + neededW);
//      System.out.println("columns number is " + fields.size());
    } else if(columnsList.size() == 2) {
      // reports & subreports
      columns = (ReportColumns)columnsList.get(0);
      String groupByField = columns.getGroupbyField();
      SpreadSheetFieldArray mainFields = columns.getFieldArray();
      columns = (ReportColumns)columnsList.get(1);
      SpreadSheetFieldArray detailFields;
      if (fieldArray != null)
        detailFields = fieldArray;
      else
        detailFields = columns.getFieldArray();
     
      addFields(mainFields);
      addFields(detailFields);
     
      JRDesignGroup group = new JRDesignGroup();
View Full Code Here

TOP

Related Classes of com.projity.configuration.ReportColumns

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.