Examples of DJGroupVariableDef


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

    }
  }

  protected Object transformEntity(Entity entity) {
    log.debug("transforming group variable...");
    DJGroupVariableDef columnsGroupVariable = (DJGroupVariableDef) entity;
    DJCalculation op = columnsGroupVariable.getOperation();

    JRDesignExpression expression = new JRDesignExpression();
   
    String valueClassName = null;
    String initialExpression = null;

    if (columnsGroupVariable.getColumnProperty() != null) { //A variable that operates over a FIELD
      ColumnProperty prop = columnsGroupVariable.getColumnProperty();
     
      expression.setText("$F{" + prop.getProperty() + "}");
      expression.setValueClassName(prop.getValueClassName());
      registerField(prop);
     
      valueClassName = ExpressionUtils.getValueClassNameForOperation(op, prop);
      initialExpression = ExpressionUtils.getInitialValueExpressionForOperation(op,prop);
     
    } else {
      AbstractColumn col = columnsGroupVariable.getColumnToApplyOperation();
     
      if (col instanceof ExpressionColumn && ((ExpressionColumn)col).getExpressionForCalculation() != null){
        ExpressionColumn expcol = (ExpressionColumn)col;
        expression.setText(expcol.getTextForExpressionForCalculartion());
        expression.setValueClassName(expcol.getExpressionForCalculation().getClassName());
      }
      else {
        expression.setText(col.getTextForExpression());
        expression.setValueClassName(col.getValueClassNameForExpression());
      }

      valueClassName = col.getVariableClassName(op);
      initialExpression = col.getInitialExpression(op);
    }

    JRDesignVariable variable = new JRDesignVariable();
    variable.setExpression(expression);
    variable.setCalculation(columnsGroupVariable.getOperation().getValue());
    variable.setName(columnsGroupVariable.getName());

    if (group != null) {
      variable.setResetType(JRDesignVariable.RESET_TYPE_GROUP);
      variable.setResetGroup(group);
    }
View Full Code Here

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

        PercentageColumn percentageColumn = ((PercentageColumn) column);       
        for (Iterator iterator2 = dr.getColumnsGroups().iterator(); iterator2.hasNext();) {
          DJGroup djGroup = (DJGroup) iterator2.next();
          JRDesignGroup jrGroup = LayoutUtils.getJRDesignGroup(jd, layoutManager, djGroup);
          DJGroupVariableDefRegistrationManager variablesRM = new DJGroupVariableDefRegistrationManager(jd,dr,layoutManager, jrGroup);
          DJGroupVariableDef variable = new DJGroupVariableDef(percentageColumn.getGroupVariableName(djGroup), percentageColumn.getPercentageColumn(), DJCalculation.SUM);
          Collection entities = new ArrayList();
          entities.add(variable);
          variablesRM.registerEntities(entities);
        }
      }     
View Full Code Here

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

    globalVariablesGroup.addFooterVariable(new DJGroupVariable(column, valueExpression, style));
    return this;
  }
 
  public DynamicReportBuilder addGlobalVariable(String name, AbstractColumn col, DJCalculation op) {
    globalVariablesGroup.addVariable(new DJGroupVariableDef(name, col, op));
    return this;
  }
View Full Code Here

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

    globalVariablesGroup.addVariable(new DJGroupVariableDef(name, col, op));
    return this;
  }

  public DynamicReportBuilder addGlobalVariable(String name, ColumnProperty prop, DJCalculation op) {
    globalVariablesGroup.addVariable(new DJGroupVariableDef(name, prop, op));
    return this;
  }
View Full Code Here

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

    globalVariablesGroup.addVariable(new DJGroupVariableDef(name, prop, op));
    return this;
  }

  public DynamicReportBuilder addGlobalVariable(String name, String property, String className, DJCalculation op) {
    globalVariablesGroup.addVariable(new DJGroupVariableDef(name, new ColumnProperty(property, className), op));
    return this;
  }
View Full Code Here

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

   * @param col
   * @param op
   * @return
   */
  public GroupBuilder addVariable(String name, String property, String className, DJCalculation operation) {   
    group.getVariables().add(new DJGroupVariableDef(name, new ColumnProperty(property,className), operation));
    return this;
  }
View Full Code Here

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

    group.getVariables().add(new DJGroupVariableDef(name, new ColumnProperty(property,className), operation));
    return this;
  }

  public GroupBuilder addVariable(String name, ColumnProperty prop, DJCalculation operation) {   
    group.getVariables().add(new DJGroupVariableDef(name, prop, operation));
    return this;
  }
View Full Code Here

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

    group.getVariables().add(new DJGroupVariableDef(name, prop, operation));
    return this;
  }
 
  public GroupBuilder addVariable(String name, AbstractColumn column, DJCalculation operation) {
    group.getVariables().add(new DJGroupVariableDef(name, column, operation));
    return this;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.