ItemSumFunction
Description
A report function that calculates the sum of one field (column) from the data source. This function produces a running total, no global total. For a global sum, use the TotalGroupSumFunction function. The function can be used in two ways:
- to calculate a sum for the entire report
- to calculate a sum within a particular group
This function expects its input values to be java.lang.Number instances.
The function understands two parameters:
- field parameter is required and denotes the name of an ItemBand-field which gets summed up.
- group parameter denotes the name of a group. When this group is started, the counter gets reset to null.
Example
<expression class="org.jfree.report.function.ItemSumFunction" name="RegionActual"> <properties> <property name="field">ACTUAL</property> <property name="group">RegionGroup</property> </properties> </expression>