Package ar.com.fdvs.dj.domain.entities

Examples of ar.com.fdvs.dj.domain.entities.DJGroup


   * @param groupNum
   * @return
   * @throws BuilderException
   */
  private DJGroup getGroupByNumber(int groupNum) throws BuilderException {
    DJGroup group;
    try {
      group = (DJGroup) report.getColumnsGroups().get(groupNum-1);
    } catch (IndexOutOfBoundsException e) {
      throw new BuilderException("No such group, use addGroups(int) first");
    }
View Full Code Here


    this.globalVariablesGroup.addFooterVariable(new DJGroupVariable(column, op, style));
    return this;
  }

  public FastReportBuilder addFooterVariable(int groupNum, int colNumber, DJCalculation op, Style style) throws BuilderException {
    DJGroup group = getGroupByNumber(groupNum);
    PropertyColumn column = (PropertyColumn) report.getColumns().get(colNumber -1);
    if (style == null)
      style = numberStyle;

    DJGroupVariable columnsGroupVariable = new DJGroupVariable(column, op, style);
    group.getFooterVariables().add(columnsGroupVariable);
    return this;
  }
View Full Code Here

    group.getFooterVariables().add(columnsGroupVariable);
    return this;
  }

  public FastReportBuilder addFooterVariable(int groupNum, int colNumber, DJCalculation op, Style style, DJValueFormatter valueFormatter) throws BuilderException {
    DJGroup group = getGroupByNumber(groupNum);
    PropertyColumn column = (PropertyColumn) report.getColumns().get(colNumber -1);
    if (style == null)
      style = numberStyle;
   
    DJGroupVariable columnsGroupVariable = new DJGroupVariable(column, op, style, valueFormatter);
    group.getFooterVariables().add(columnsGroupVariable);
    return this;
  }
View Full Code Here

    group.getFooterVariables().add(columnsGroupVariable);
    return this;
  }

  public FastReportBuilder addHeaderCrosstab(int groupNumber, DJCrosstab djcross) throws BuilderException {
    DJGroup group = getGroupByNumber(groupNumber);
    group.getHeaderCrosstabs().add(djcross);
    return this;
  }
View Full Code Here

    group.getHeaderCrosstabs().add(djcross);
    return this;
  }
 
  public FastReportBuilder addFooterCrosstab(int groupNumber, DJCrosstab djcross) throws BuilderException {
    DJGroup group = getGroupByNumber(groupNumber);
    group.getFooterCrosstabs().add(djcross);
    return this;
  }
View Full Code Here

  private void addGlobalCrosstabs() {
    //For header
    if (globalHeaderCrosstabs != null) {
      for (Iterator iterator = globalHeaderCrosstabs.iterator(); iterator.hasNext();) {
        DJCrosstab djcross = (DJCrosstab) iterator.next();
        DJGroup globalGroup = createDummyGroupForCrosstabs("crosstabHeaderGroup-" + globalHeaderCrosstabs.indexOf(djcross));
        globalGroup.getHeaderCrosstabs().add(djcross);
        report.getColumnsGroups().add(0,globalGroup);
      }
    }

    //For footer
    if (globalFooterCrosstabs != null) {
      for (Iterator iterator = globalFooterCrosstabs.iterator(); iterator.hasNext();) {
        DJCrosstab djcross = (DJCrosstab) iterator.next();
        DJGroup globalGroup = createDummyGroupForCrosstabs("crosstabFooterGroup-" + globalFooterCrosstabs.indexOf(djcross));
        globalGroup.getFooterCrosstabs().add(djcross);
        report.getColumnsGroups().add(0,globalGroup);
      }
    }

  }
View Full Code Here

  protected void addSubreportsToGroups() {
    for (Iterator iterator = groupFooterSubreports.keySet().iterator(); iterator.hasNext();) {
      Integer groupNum = (Integer) iterator.next();
      List list = (List) groupFooterSubreports.get(groupNum);

      DJGroup group = (DJGroup) report.getColumnsGroups().get(groupNum.intValue() - 1);
      group.getFooterSubreports().addAll(list);
    }

    for (Iterator iterator = groupHeaderSubreports.keySet().iterator(); iterator.hasNext();) {
      Integer groupNum = (Integer) iterator.next();
      List list = (List) groupHeaderSubreports.get(groupNum);

      DJGroup group = (DJGroup) report.getColumnsGroups().get(groupNum.intValue() - 1);
      group.getHeaderSubreports().addAll(list);
    }

  }
View Full Code Here

   * adds the subreport.
   */
  protected void concatenateReports() {

    if (!concatenatedReports.isEmpty()){ // dummy group for page break if needed
      DJGroup globalGroup = createDummyGroup();
      report.getColumnsGroups().add(0,globalGroup);
    }
    for (Iterator iterator = concatenatedReports.iterator(); iterator.hasNext();) {
      Subreport subreport = (Subreport) iterator.next();
      DJGroup globalGroup = createDummyGroup();
      globalGroup.getFooterSubreports().add(subreport);
      report.getColumnsGroups().add(0,globalGroup);
    }
  }
View Full Code Here

  /**
   * @return
   */
  private DJGroup createDummyGroup() {
    DJGroup globalGroup = new DJGroup();
    globalGroup.setLayout(GroupLayout.EMPTY);
    GlobalGroupColumn globalCol = new GlobalGroupColumn("global");
//    globalCol.setTitle(grandTotalLegend);
//    globalCol.setHeaderStyle(grandTotalStyle);
//    globalCol.setStyle(grandTotalStyle);

    globalGroup.setColumnToGroupBy(globalCol);
//    globalGroup.setHeaderVariables(globalHeaderVariables);
//    globalGroup.setFooterVariables(globalFooterVariables);
    return globalGroup;
  }
View Full Code Here

//    globalGroup.setFooterVariables(globalFooterVariables);
    return globalGroup;
  }

  private DJGroup createDummyGroupForCrosstabs(String name) {
    DJGroup globalGroup = new DJGroup();
    globalGroup.setLayout(GroupLayout.EMPTY);
    GlobalGroupColumn globalCol = new GlobalGroupColumn(name );

    globalCol.setTitle("");
//    globalCol.setHeaderStyle(grandTotalStyle);
//    globalCol.setStyle(grandTotalStyle);

    globalGroup.setColumnToGroupBy(globalCol);
    return globalGroup;
  }
View Full Code Here

TOP

Related Classes of ar.com.fdvs.dj.domain.entities.DJGroup

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.