|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.jfree.report.function.AbstractExpression
|
+--org.jfree.report.function.AbstractFunction
|
+--org.jfree.report.function.TotalCalculationFunction
A report function that stores the result of a calculation for a group or the complete report. The field value, that was read when the group finished, is stored and returned when the group gets active again in a higher processing level.
This function can be used to calculate total values for a group, f.I. a TotalMax for the group, which returns the maximum value encountered for that field in the current group. The computed values are available to all bands of the group. The function undestands two parameters, thefield 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. This parameter is optional.
| Constructor Summary | |
TotalCalculationFunction()
Constructs a new function. |
|
| Method Summary | |
java.lang.String |
getField()
Returns the name of the group to be totalled. |
java.lang.String |
getGroup()
Returns the name of the group to be totalled. |
java.lang.Object |
getValue()
Return the current expression value. |
void |
groupFinished(ReportEvent event)
Receives notification that a group has finished. |
void |
groupStarted(ReportEvent event)
Receives notification that a group has started. |
void |
reportFinished(ReportEvent event)
Receives notification that the report has finished. |
void |
reportInitialized(ReportEvent event)
Receives notification that the report has started. |
void |
setField(java.lang.String field)
Defines the name of the group to be totalled. |
void |
setGroup(java.lang.String group)
Defines the name of the group to be totalled. |
| Methods inherited from class org.jfree.report.function.AbstractFunction |
clone,
itemsAdvanced,
itemsFinished,
itemsStarted,
reportDone,
reportStarted |
| Methods inherited from class org.jfree.report.function.AbstractExpression |
getDataRow,
getDependencyLevel,
getInstance,
getName,
getReportConfiguration,
getResourceBundleFactory,
getRuntime,
isActive,
setActive,
setDependencyLevel,
setName,
setRuntime |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public TotalCalculationFunction()
Initially the function has no name...be sure to assign one before using the function.
| Method Detail |
public void reportInitialized(ReportEvent event)
event - the event.public void groupStarted(ReportEvent event)
event - the event.public void groupFinished(ReportEvent event)
event - the event.public void reportFinished(ReportEvent event)
event - the event.public java.lang.String getGroup()
public void setGroup(java.lang.String group)
group - the group name.public java.lang.String getField()
public void setField(java.lang.String field)
field - the field name.public java.lang.Object getValue()
The value depends (obviously) on the expression implementation.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||