|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.function.AbstractExpression
org.pentaho.reporting.engine.classic.core.function.AbstractFunction
org.pentaho.reporting.engine.classic.core.function.TotalCalculationFunction
public class TotalCalculationFunction
A report function that stores the result of a calculation for a group or the complete report. This function can be used to convert simple running-functions into total-functions by wrapping them up. The wrapped up function will be evaluated as usual and the result at the end of the report and/or end of the group will be stored in the TotalCalculationFunction.
Constructor Summary | |
---|---|
TotalCalculationFunction()
Constructs a new function. |
Method Summary | |
---|---|
String |
getField()
Returns the field used by the function. |
String |
getGroup()
Returns the name of the group to be totalled. |
Expression |
getInstance()
Return a completly separated copy of this function. |
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(String field)
Sets the field name for the function. |
void |
setGroup(String group)
Defines the name of the group to be totalled. |
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction |
---|
itemsAdvanced, itemsFinished, itemsStarted, reportDone, reportStarted |
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression |
---|
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression |
---|
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime |
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)
reportInitialized
in interface ReportListener
reportInitialized
in class AbstractFunction
event
- the event.public void groupStarted(ReportEvent event)
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- the event.public void groupFinished(ReportEvent event)
groupFinished
in interface ReportListener
groupFinished
in class AbstractFunction
event
- the event.public void reportFinished(ReportEvent event)
reportFinished
in interface ReportListener
reportFinished
in class AbstractFunction
event
- the event.public String getGroup()
public void setGroup(String group)
group
- the group name.public String getField()
public void setField(String field)
field
- the field name.public Object getValue()
The value depends (obviously) on the expression implementation.
public Expression getInstance()
AbstractExpression
getInstance
in interface Expression
getInstance
in class AbstractExpression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |