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

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


  /**
   * For creating expression columns
   * @return
   */
  protected AbstractColumn buildExpressionColumn() {
    ExpressionColumn column = new ExpressionColumn();
    populateCommonAttributes(column);
    int random = new Random().nextInt();
    column.setColumnProperty(new ColumnProperty("expressionColumn" + random,CustomExpression.class.getName()));
    column.setExpression(customExpression);
    column.setExpressionToGroupBy(customExpressionToGroupBy);
//    column.getFieldProperties().putAll(fieldProperties);
    return column;
  }
View Full Code Here


        if ( propertyColumn.getColumnProperty() != null && !(entity instanceof ExpressionColumn)){
          getDjd().addField((JRField)transformEntity(entity));
        }
        if (entity instanceof ExpressionColumn) {
          //The Custom Expression parameter must be registered
          ExpressionColumn expressionColumn = (ExpressionColumn) entity;
//          ArrayList l = new ArrayList(getColumns());
//          for (Iterator iter = getDynamicReport().getFields().iterator(); iter.hasNext();) {
//            ColumnProperty columnProperty = (ColumnProperty) iter.next();
//            SimpleColumn simpleColumn = new SimpleColumn();
//            simpleColumn.setColumnProperty(columnProperty);
//            l.add(simpleColumn);
//
//          }
          expressionColumn.setColumns( getDynamicReport().getAllFields() );
          expressionColumn.setVariables( new ArrayList(getDjd().getVariablesList()) );
          registerExpressionColumnParameter(expressionColumn.getColumnProperty().getProperty(), expressionColumn.getExpression());
        }
      } catch (JRException e) {
        log.info(FIELD_ALREADY_REGISTERED);
      }
    }
View Full Code Here

    if (expressionToGroupBy != null) { //new in 3.0.7-b5
      useVariableForCustomExpression(group, jrExpression, expressionToGroupBy);
     
    } else {
      if (column instanceof ExpressionColumn){
        ExpressionColumn col = (ExpressionColumn)column;
        CustomExpression customExpression = col.getExpression();
        useVariableForCustomExpression(group, jrExpression, customExpression);
      } else {
        jrExpression.setText(column.getTextForExpression());
        jrExpression.setValueClassName(column.getValueClassNameForExpression());
      }
View Full Code Here

  /**
   * For creating expression columns
   * @return
   */
  private AbstractColumn buildExpressionColumn() {
    ExpressionColumn column = new ExpressionColumn();
    populateCommonAttributes(column);
    int random = new Random().nextInt();
    column.setColumnProperty(new ColumnProperty("expressionColumn" + random,CustomExpression.class.getName()));
    column.setExpression(customExpression);
    column.setExpressionToGroupBy(customExpressionToGroupBy);
    return column;
  }
View Full Code Here

        if ( propertyColumn.getColumnProperty() != null && !(entity instanceof ExpressionColumn)){
          getDjd().addField((JRField)transformEntity(entity));
        }
        if (entity instanceof ExpressionColumn) {
          //The Custom Expression parameter must be registered
          ExpressionColumn expressionColumn = (ExpressionColumn) entity;
          ArrayList l = new ArrayList(getColumns());
          for (Iterator iter = getDynamicReport().getFields().iterator(); iter.hasNext();) {
            ColumnProperty columnProperty = (ColumnProperty) iter.next();
            SimpleColumn simpleColumn = new SimpleColumn();
            simpleColumn.setColumnProperty(columnProperty);
            l.add(simpleColumn);

          }
          expressionColumn.setColumns( l );
          registerExpressionColumnParameter(expressionColumn.getColumnProperty().getProperty(), expressionColumn.getExpression());
        }
      } catch (JRException e) {
        log.info(FIELD_ALREADY_REGISTERED);
      }
    }
View Full Code Here

    //only variables from the last registered group are important now
    List groupsList = getDjd().getGroupsList();
    JRDesignGroup registeredGroup = (JRDesignGroup)groupsList.get(groupsList.size()-1);

    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());
    }
   
View Full Code Here

        if ( propertyColumn.getColumnProperty() != null && !(entity instanceof ExpressionColumn)){
          getDjd().addField((JRField)transformEntity(entity));
        }
        if (entity instanceof ExpressionColumn) {
          //The Custom Expression parameter must be registered
          ExpressionColumn expressionColumn = (ExpressionColumn) entity;
//          ArrayList l = new ArrayList(getColumns());
//          for (Iterator iter = getDynamicReport().getFields().iterator(); iter.hasNext();) {
//            ColumnProperty columnProperty = (ColumnProperty) iter.next();
//            SimpleColumn simpleColumn = new SimpleColumn();
//            simpleColumn.setColumnProperty(columnProperty);
//            l.add(simpleColumn);
//
//          }
          expressionColumn.setColumns( getDynamicReport().getAllFields() );
          expressionColumn.setVariables( new ArrayList(getDjd().getVariablesList()) );
          String property_name = expressionColumn.getColumnProperty().getProperty();
          registerExpressionColumnParameter(property_name, expressionColumn.getExpression());
          registerExpressionColumnParameter(property_name + "_calc", expressionColumn.getExpressionForCalculation());
        }
      } catch (JRException e) {
        log.info(FIELD_ALREADY_REGISTERED);
      }
    }
View Full Code Here

  /**
   * For creating expression columns
   * @return
   */
  protected AbstractColumn buildExpressionColumn() {
    ExpressionColumn column = new ExpressionColumn();
    populateCommonAttributes(column);
    int random = new Random().nextInt();
    column.setColumnProperty(new ColumnProperty("expressionColumn" + random,CustomExpression.class.getName()));
    column.setExpression(customExpression);
    column.setExpressionToGroupBy(customExpressionToGroupBy);
    column.setExpressionForCalculation(customExpressionForCalculation);
//    column.getFieldProperties().putAll(fieldProperties);
    return column;
  }
View Full Code Here

        if ( propertyColumn.getColumnProperty() != null && !(entity instanceof ExpressionColumn)){
          getDjd().addField((JRField)transformEntity(entity));
        }
        if (entity instanceof ExpressionColumn) {
          //The Custom Expression parameter must be registered
          ExpressionColumn expressionColumn = (ExpressionColumn) entity;
          ArrayList l = new ArrayList(getColumns());
          for (Iterator iter = getDynamicReport().getFields().iterator(); iter.hasNext();) {
            ColumnProperty columnProperty = (ColumnProperty) iter.next();
            SimpleColumn simpleColumn = new SimpleColumn();
            simpleColumn.setColumnProperty(columnProperty);
            l.add(simpleColumn);

          }
          expressionColumn.setColumns( l );
          expressionColumn.setVariables( new ArrayList(getDjd().getVariablesList()) );
          registerExpressionColumnParameter(expressionColumn.getColumnProperty().getProperty(), expressionColumn.getExpression());
        }
      } catch (JRException e) {
        log.info(FIELD_ALREADY_REGISTERED);
      }
    }
View Full Code Here

  /**
   * For creating expression columns
   * @return
   */
  protected AbstractColumn buildExpressionColumn() {
    ExpressionColumn column = new ExpressionColumn();
    populateCommonAttributes(column);
    int random = new Random().nextInt();
    column.setColumnProperty(new ColumnProperty("expressionColumn" + random,CustomExpression.class.getName()));
    column.setExpression(customExpression);
    column.setExpressionToGroupBy(customExpressionToGroupBy);
//    column.getFieldProperties().putAll(fieldProperties);
    return column;
  }
View Full Code Here

TOP

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

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.