Save This Page
Home » pentaho-reporting-engine-classic-0.8.10 » org » jfree » report » function » [javadoc | source]
org.jfree.report.function
public class: TotalGroupSumQuotientPercentFunction [javadoc | source]
java.lang.Object
   org.jfree.report.function.AbstractExpression
      org.jfree.report.function.AbstractFunction
         org.jfree.report.function.TotalGroupSumQuotientFunction
            org.jfree.report.function.TotalGroupSumQuotientPercentFunction

All Implemented Interfaces:
    Function, Expression, Serializable

A report function that calculates the quotient of two summed fields (columns) from the data-row. This function produces a global total. The total sum of the group is known when the group processing starts and the report is not performing a prepare-run. The sum is calculated in the prepare run and recalled in the printing run.

The function can be used in two ways:

This function expects its input values to be either java.lang.Number instances or Strings that can be parsed to java.lang.Number instances using a java.text.DecimalFormat.

The function undestands three parameters. The dividend parameter is required and denotes the name of an ItemBand-field which gets summed up as dividend. The divisor parameter is required and denotes the name of an ItemBand-field which gets summed up as divisor.

The parameter group denotes the name of a group. When this group is started, the counter gets reseted to null. This parameter is optional.

This function scales the computed percentage to 100. A value of 100% will therefore be returned as 100 instead of 1. The result of this function cannot be used together with the percentage operator of the NumberFormat in a Number-field.

Constructor:
 public TotalGroupSumQuotientPercentFunction() 
Method from org.jfree.report.function.TotalGroupSumQuotientPercentFunction Summary:
getValue
Methods from org.jfree.report.function.TotalGroupSumQuotientFunction:
getDividend,   getDivisor,   getGroup,   getRoundingMode,   getScale,   getValue,   groupStarted,   itemsAdvanced,   reportInitialized,   setDependencyLevel,   setDividend,   setDivisor,   setGroup,   setRoundingMode,   setRuntime,   setScale
Methods from org.jfree.report.function.AbstractFunction:
groupFinished,   groupStarted,   itemsAdvanced,   itemsFinished,   itemsStarted,   reportDone,   reportFinished,   reportInitialized,   reportStarted
Methods from org.jfree.report.function.AbstractExpression:
clone,   getDataRow,   getDependencyLevel,   getInstance,   getName,   getReportConfiguration,   getResourceBundleFactory,   getRuntime,   isActive,   isDeepTraversing,   isPreserve,   setActive,   setDependencyLevel,   setName,   setPreserve,   setRuntime
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.report.function.TotalGroupSumQuotientPercentFunction Detail:
 public Object getValue() 
    Computes the scaled percentage.