Package net.sf.jasperreports.engine.design

Examples of net.sf.jasperreports.engine.design.JRDesignSubreportReturnValue


  }

 
  protected JRSubreportReturnValue createHelperReturnValue(JRSubreportReturnValue returnValue, String nameSuffix, CalculationEnum calculation)
  {
    JRDesignSubreportReturnValue helper = new JRDesignSubreportReturnValue();
    helper.setToVariable(returnValue.getToVariable() + nameSuffix);
    helper.setSubreportVariable(returnValue.getSubreportVariable());
    helper.setCalculation(calculation);
    helper.setIncrementerFactoryClassName(helper.getIncrementerFactoryClassName());//FIXME shouldn't it be returnValue?
   
    return helper;
  }
View Full Code Here


  }
 

  protected JRSubreportReturnValue createDistinctCountHelperReturnValue(JRSubreportReturnValue returnValue)
  {
    JRDesignSubreportReturnValue helper = new JRDesignSubreportReturnValue();
    helper.setToVariable(returnValue.getToVariable() + "_DISTINCT_COUNT");
    helper.setSubreportVariable(returnValue.getSubreportVariable());
    helper.setCalculation(CalculationEnum.NOTHING);
    helper.setIncrementerFactoryClassName(helper.getIncrementerFactoryClassName());//FIXME shouldn't it be returnValue? tests required
   
    return helper;
  }
View Full Code Here

  public Object createObject(Attributes atts)
  {
    JRXmlLoader xmlLoader = (JRXmlLoader) digester.peek(digester.getCount() - 1);
    JasperDesign design = (JasperDesign) digester.peek(digester.getCount() - 2);
   
    JRDesignSubreportReturnValue returnValue = new JRDesignSubreportReturnValue();

    String variableName = atts.getValue(JRXmlConstants.ATTRIBUTE_toVariable);
    JRVariable variable = (JRVariable) design.getVariablesMap().get(variableName);
    if (variable == null)
    {
      xmlLoader.addError(new JRValidationException("Unknown variable " + variableName, returnValue));
    }
   
    returnValue.setSubreportVariable(atts.getValue(JRXmlConstants.ATTRIBUTE_subreportVariable));
    returnValue.setToVariable(variableName);

    CalculationEnum calculation = CalculationEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_calculation));
    if (calculation != null)
    {
      returnValue.setCalculation(calculation);
    }
   
    String incrementerFactoryClass = atts.getValue(JRXmlConstants.ATTRIBUTE_incrementerFactoryClass);
    if (incrementerFactoryClass != null)
    {
      returnValue.setIncrementerFactoryClassName(incrementerFactoryClass);
    }

    return returnValue;
  }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.design.JRDesignSubreportReturnValue

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.