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

Examples of ar.com.fdvs.dj.domain.entities.columns.PropertyColumn


   * @return
   * @throws BuilderException
   */
  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);
View Full Code Here


  //PropertyColumn only can be used for grouping (not OperationColumn)
  protected Object transformEntity(Entity entity) {
    log.debug("transforming group...");
    DJGroup djgroup = (DJGroup) entity;
    PropertyColumn column = djgroup.getColumnToGroupBy();
    JRDesignGroup group = new JRDesignGroup();

    int groupIndex = getDynamicReport().getColumnsGroups().indexOf(djgroup);
    int columnIndex = getDynamicReport().getColumns().indexOf(djgroup.getColumnToGroupBy());
    if (column instanceof GlobalGroupColumn){
      group.setName("global_column_" + groupIndex);
    } else {
      group.setName( "group["+groupIndex+"]_for_column_" + columnIndex + "-" +  column.getTitle());
    }
   
    getLayoutManager().getReferencesMap().put(group.getName(), djgroup);

    group.setCountVariable(new JRDesignVariable());
    group.setGroupFooter(new JRDesignBand());
    group.setGroupHeader(new JRDesignBand());

    JRDesignExpression jrExpression = new JRDesignExpression();
   
    CustomExpression expressionToGroupBy = column.getExpressionToGroupBy();
    if (expressionToGroupBy != null) { //new in 3.0.7-b5
      String expToGroupByName = group.getName() + "_expression_to_group_by";
      registerCustomExpressionParameter(expToGroupByName, expressionToGroupBy);
      String expText = ExpressionUtils.createCustomExpressionInvocationText(expToGroupByName);
      jrExpression.setText(expText);
      log.debug("Expression for CustomExpression = " + expText);
      jrExpression.setValueClassName(expressionToGroupBy.getClassName());
    } else {
      jrExpression.setText(column.getTextForExpression());
      jrExpression.setValueClassName(column.getValueClassNameForExpression());
    }
   

    group.setExpression(jrExpression);
    group.setCountVariable(new JRDesignVariable());
View Full Code Here

TOP

Related Classes of ar.com.fdvs.dj.domain.entities.columns.PropertyColumn

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.