|
||||||||||
| 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.GroupCountFunction
public class GroupCountFunction
A report function that counts groups in a report. If a null-groupname is given, all groups are counted.
The group to be counted can be defined using the property "group". An optional container group can be defined using the property "parent-group". When the group start event of that group is encountered, the counter will be reset to '0'. If the group property is not set, all group starts get counted.
| Constructor Summary | |
|---|---|
GroupCountFunction()
Default constructor. |
|
GroupCountFunction(String name,
String group)
Constructs a report function for counting groups. |
|
| Method Summary | |
|---|---|
String |
getGroup()
Returns the name of the group to be counted. |
String |
getParentGroup()
Returns the name of the group on which to reset the counter. |
Object |
getValue()
Returns the number of groups processed so far (including the current group). |
void |
groupStarted(ReportEvent event)
Receives notification that a new group is about to start. |
void |
reportInitialized(ReportEvent event)
Receives notification that a new report is about to start. |
void |
setGroup(String group)
defines the name of the group to be counted. |
void |
setParentGroup(String group)
defines the name of the group on which to reset the counter. |
| Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction |
|---|
groupFinished, itemsAdvanced, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted |
| Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression |
|---|
clone, getDataRow, getDependencyLevel, getInstance, 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, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime |
| Constructor Detail |
|---|
public GroupCountFunction()
public GroupCountFunction(String name,
String group)
name - The function name.group - The group name.
NullPointerException - if the given name is null| Method Detail |
|---|
public String getParentGroup()
public void setParentGroup(String group)
group - the name of the group to be counted.public String getGroup()
public void setGroup(String group)
group - the name of the group to be counted.public void reportInitialized(ReportEvent event)
reportInitialized in interface ReportListenerreportInitialized in class AbstractFunctionevent - the current report event received.public void groupStarted(ReportEvent event)
groupStarted in interface ReportListenergroupStarted in class AbstractFunctionevent - the current report event received.public Object getValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||