org.jfree.report.function
public class: ItemSumFunction [javadoc |
source]
java.lang.Object
org.jfree.report.function.AbstractExpression
org.jfree.report.function.AbstractFunction
org.jfree.report.function.ItemSumFunction
All Implemented Interfaces:
Function, Expression, Serializable
Direct Known Subclasses:
PageItemSumFunction, ConditionalItemSumFunction
A report function that calculates the sum of one field (column) from the data-row. 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 either java.lang.Number instances or Strings that can be parsed to
java.lang.Number instances using a java.text.DecimalFormat.
The function undestands two parameters, the
field parameter is required and denotes the name of an
ItemBand-field which gets summed up.
The parameter
group denotes the name of a group. When this group is started, the counter gets reseted to
null.
| Field Summary |
|---|
| protected static final BigDecimal | ZERO | A useful constant representing zero. |
| Method from org.jfree.report.function.ItemSumFunction Summary: |
|---|
|
getField, getGroup, getInstance, getSum, getValue, groupStarted, itemsAdvanced, reportInitialized, setField, setGroup, setSum |
| Methods from org.jfree.report.function.AbstractExpression: |
|---|
|
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime |