TotalGroupSumQuotientFunction

Description

A report function that calculates the quotient of two summed fields (columns) from the data source. 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:

  • to calculate a quotient for the entire report
  • to calculate a quotient within a particular group

This function expects its input values to be java.lang.Number instances.

The function understands three parameters.

  • dividend parameter is required and denotes the name of an Item Section field which is used as dividend.
  • divisor parameter is required and denotes the name of an Item Section field which is used as divisor.
  • group parameter denotes the name of a group. When this group is started, the counter gets reset to null.

Example

<function class="org.jfree.report.function.TotalGroupSumQuotientFunction" deplevel="" name="Year_Over_Ratio">
  <properties>
    <property name="group">REGION GROUP</property>
    <property name="dividend">Y2000</property>
    <property name="divisor">Y2001</property>
  </properties>
</function>