Package ar.com.fdvs.dj.domain

Examples of ar.com.fdvs.dj.domain.DJCrosstabMeasure


        JRDesignTextField element = new JRDesignTextField();
        element.setWidth(crosstabColumn.getWidth());
        element.setHeight(crosstabRow.getHeight());

        JRDesignExpression measureExp = new JRDesignExpression();
        DJCrosstabMeasure measure = djcross.getMeasure(0);
        measureExp.setValueClassName(measure.getProperty().getValueClassName());
        measureExp.setText("$V{"+measure.getProperty().getProperty()+"}");

        element.setExpression(measureExp);

        /**
         * Is there any style for this object?
         */
        if (crosstabRow.getProperty() == null && crosstabColumn.getProperty() == null && measure.getStyle() != null ){
          //this is the inner most cell
          layoutManager.applyStyleToElement(measure.getStyle() , element);
        } else if (crosstabRow.getTotalStyle() != null) {
          layoutManager.applyStyleToElement(crosstabRow.getTotalStyle(), element);
        }
        else if (crosstabColumn.getTotalStyle() != null) {
          layoutManager.applyStyleToElement(crosstabColumn.getTotalStyle(), element);
View Full Code Here


  /**
   * @param djcross
   */
  private void registerMeasures() {
    for (Iterator iterator = djcross.getMeasures().iterator(); iterator.hasNext();) {
      DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();

      JRDesignCrosstabMeasure measure = new JRDesignCrosstabMeasure();
      measure.setName(djmeasure.getProperty().getProperty());
      measure.setCalculation(djmeasure.getOperation().getValue());
      measure.setValueClassName(djmeasure.getProperty().getValueClassName());
      JRDesignExpression valueExp = new JRDesignExpression();
      valueExp.setValueClassName(djmeasure.getProperty().getValueClassName());
      valueExp.setText("$F{"+djmeasure.getProperty().getProperty()+"}");
      measure.setValueExpression(valueExp);

      try {
        jrcross.addMeasure(measure);
      } catch (JRException e) {
View Full Code Here

  public CrosstabBuilder setCellBorder(Border cellBorder) {
    crosstab.setCellBorder(cellBorder);
    return this;
  }
  public CrosstabBuilder addMeasure(String property, String className, DJCalculation operation, String title, Style style) {
    DJCrosstabMeasure measure = new DJCrosstabMeasure(property,className, operation , title);
    measure.setStyle(style);
    crosstab.getMeasures().add(measure);
    return this;
  }
View Full Code Here

        JRDesignTextField element = new JRDesignTextField();
        element.setWidth(crosstabColumn.getWidth());
        element.setHeight(crosstabRow.getHeight());

        JRDesignExpression measureExp = new JRDesignExpression();
        DJCrosstabMeasure measure = djcross.getMeasure(0);
        measureExp.setValueClassName(measure.getProperty().getValueClassName());
        measureExp.setText("$V{"+measure.getProperty().getProperty()+"}");

        element.setExpression(measureExp);

        /**
         * Is there any style for this object?
         */
        if (crosstabRow.getProperty() == null && crosstabColumn.getProperty() == null && measure.getStyle() != null ){
          //this is the inner most cell
          layoutManager.applyStyleToElement(measure.getStyle() , element);
        } else if (crosstabRow.getTotalStyle() != null) {
          layoutManager.applyStyleToElement(crosstabRow.getTotalStyle(), element);
        }
        else if (crosstabColumn.getTotalStyle() != null) {
          layoutManager.applyStyleToElement(crosstabColumn.getTotalStyle(), element);
View Full Code Here

  /**
   * @param djcross
   */
  private void registerMeasures() {
    for (Iterator iterator = djcross.getMeasures().iterator(); iterator.hasNext();) {
      DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();

      JRDesignCrosstabMeasure measure = new JRDesignCrosstabMeasure();
      measure.setName(djmeasure.getProperty().getProperty());
      measure.setCalculation(djmeasure.getOperation().getValue());
      measure.setValueClassName(djmeasure.getProperty().getValueClassName());
      JRDesignExpression valueExp = new JRDesignExpression();
      valueExp.setValueClassName(djmeasure.getProperty().getValueClassName());
      valueExp.setText("$F{"+djmeasure.getProperty().getProperty()+"}");
      measure.setValueExpression(valueExp);

      try {
        jrcross.addMeasure(measure);
      } catch (JRException e) {
View Full Code Here

  public CrosstabBuilder setCellBorder(Border cellBorder) {
    crosstab.setCellBorder(cellBorder);
    return this;
  }
  public CrosstabBuilder addMeasure(String property, String className, ColumnsGroupVariableOperation operation, String title, Style style) {
    DJCrosstabMeasure measure = new DJCrosstabMeasure(property,className, operation , title);
    measure.setStyle(style);
    crosstab.getMeasures().add(measure);
    return this;
  }
View Full Code Here

        JRDesignTextField element = new JRDesignTextField();
        element.setWidth(crosstabColumn.getWidth());
        element.setHeight(crosstabRow.getHeight());

        JRDesignExpression measureExp = new JRDesignExpression();
        DJCrosstabMeasure measure = djcross.getMeasure(0);
        measureExp.setValueClassName(measure.getProperty().getValueClassName());
        measureExp.setText("$V{"+measure.getProperty().getProperty()+"}");

        element.setExpression(measureExp);

        /**
         * Is there any style for this object?
         */
        if (crosstabRow.getProperty() == null && crosstabColumn.getProperty() == null && measure.getStyle() != null ){
          //this is the inner most cell
          layoutManager.applyStyleToElement(measure.getStyle() , element);
        } else if (crosstabRow.getTotalStyle() != null) {
          layoutManager.applyStyleToElement(crosstabRow.getTotalStyle(), element);
        }
        else if (crosstabColumn.getTotalStyle() != null) {
          layoutManager.applyStyleToElement(crosstabColumn.getTotalStyle(), element);
View Full Code Here

  /**
   * @param djcross
   */
  private void registerMeasures() {
    for (Iterator iterator = djcross.getMeasures().iterator(); iterator.hasNext();) {
      DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();

      JRDesignCrosstabMeasure measure = new JRDesignCrosstabMeasure();
      measure.setName(djmeasure.getProperty().getProperty());
      measure.setCalculation(JRDesignVariable.CALCULATION_SUM);
      measure.setValueClassName(Float.class.getName());
      JRDesignExpression valueExp = new JRDesignExpression();
      valueExp.setValueClassName(djmeasure.getProperty().getValueClassName());
      valueExp.setText("$F{"+djmeasure.getProperty().getProperty()+"}");
      measure.setValueExpression(valueExp);

      try {
        jrcross.addMeasure(measure);
      } catch (JRException e) {
View Full Code Here

      }
    }
   
    for (Iterator iterator = djcrosstab.getMeasures().iterator(); iterator.hasNext();) {
      JRDesignField field = new JRDesignField();
      DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();
      field.setName(djmeasure.getProperty().getProperty());
      field.setValueClassName(djmeasure.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
View Full Code Here


        int counter = 0;
        int measureHeight = crosstabRow.getHeight() / djcross.getMeasures().size();
        for (Iterator iterator = djcross.getMeasures().iterator(); iterator.hasNext(); counter++) {
          DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();
         
          JRDesignTextField element = new JRDesignTextField();
          element.setWidth(crosstabColumn.getWidth());
          element.setHeight(measureHeight);
          element.setY(counter*measureHeight);
         

          JRDesignExpression measureExp = new JRDesignExpression();
//          DJCrosstabMeasure measure = djcross.getMeasure(0);
          measureExp.setValueClassName(djmeasure.getProperty().getValueClassName());
          measureExp.setText("$V{"+djmeasure.getProperty().getProperty()+"}");
         
          element.setExpression(measureExp);

          /**
           * Is there any style for this object?
           */
          if (crosstabRow.getProperty() == null && crosstabColumn.getProperty() == null && djmeasure.getStyle() != null ){
            //this is the inner most cell
            layoutManager.applyStyleToElement(djmeasure.getStyle() , element);
          } else if (crosstabRow.getTotalStyle() != null) {
            layoutManager.applyStyleToElement(crosstabRow.getTotalStyle(), element);
          }
          else if (crosstabColumn.getTotalStyle() != null) {
            layoutManager.applyStyleToElement(crosstabColumn.getTotalStyle(), element);
          }
         
          if (djmeasure.getLink() != null){
            String name = "cell_" + i + "_" +  j + "_ope" + djmeasure.getOperation().getValue();
            HyperLinkUtil.applyHyperLinkToElement((DynamicJasperDesign)this.design, djmeasure.getLink(), element, name);
          }
 
          contents.addElement(element);
         
        }
View Full Code Here

TOP

Related Classes of ar.com.fdvs.dj.domain.DJCrosstabMeasure

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.