Class PageTotalFunction
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.function.AbstractExpression
-
- org.pentaho.reporting.engine.classic.core.function.AbstractFunction
-
- org.pentaho.reporting.engine.classic.core.function.PageFunction
-
- org.pentaho.reporting.engine.classic.core.function.PageTotalFunction
-
- All Implemented Interfaces:
Serializable
,Cloneable
,EventListener
,PageEventListener
,ReportListener
,Expression
,Function
public class PageTotalFunction extends PageFunction
Prints the total number of pages of an report. If a group is specified, this function expects the group to have the manual pagebreak enabled. This function will only work as expected in group mode if the named group has pagebreak-before set to true on the header for pagebreak-after set to true on the group's footer.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PageTotalFunction()
Creates a new page total function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression
getInstance()
Return a completly separated copy of this function.Object
getValue()
Returns the page number (function value).void
groupFinished(ReportEvent event)
Receives notification that a group has finished.void
groupStarted(ReportEvent event)
Receives notification that a group has started.void
pageFinished(ReportEvent event)
Receives notification that a page is completed.void
reportDone(ReportEvent event)
Receives notification that report generation has completed, the report footer was printed, no more output is done.void
reportInitialized(ReportEvent event)
Receives notification that the report has started.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.PageFunction
getDependencyLevel, getGroup, getPage, getPageIncrement, getStartPage, isDeepTraversing, isIgnoreNextGroupStart, isIgnoreNextPageStart, isIgnorePageCancelEvents, pageStarted, setDependencyLevel, setGroup, setIgnorePageCancelEvents, setPage, setPageIncrement, setStartPage
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
itemsAdvanced, itemsFinished, itemsStarted, reportFinished, reportStarted, summaryRowSelection
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isPreserve, setActive, setName, setPreserve, setRuntime
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
clone, getDataRow, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isPreserve, setName, setRuntime
-
-
-
-
Method Detail
-
reportInitialized
public void reportInitialized(ReportEvent event)
Receives notification that the report has started.- Specified by:
reportInitialized
in interfaceReportListener
- Overrides:
reportInitialized
in classPageFunction
- Parameters:
event
- the event.
-
groupStarted
public void groupStarted(ReportEvent event)
Description copied from class:PageFunction
Receives notification that a group has started.- Specified by:
groupStarted
in interfaceReportListener
- Overrides:
groupStarted
in classPageFunction
- Parameters:
event
- the event.
-
groupFinished
public void groupFinished(ReportEvent event)
Description copied from class:AbstractFunction
Receives notification that a group has finished.- Specified by:
groupFinished
in interfaceReportListener
- Overrides:
groupFinished
in classAbstractFunction
- Parameters:
event
- the event.
-
pageFinished
public void pageFinished(ReportEvent event)
Description copied from class:PageFunction
Receives notification that a page is completed.- Specified by:
pageFinished
in interfacePageEventListener
- Overrides:
pageFinished
in classPageFunction
- Parameters:
event
- The event.
-
reportDone
public void reportDone(ReportEvent event)
Description copied from class:AbstractFunction
Receives notification that report generation has completed, the report footer was printed, no more output is done. This is a helper event to shut down the output service.- Specified by:
reportDone
in interfaceReportListener
- Overrides:
reportDone
in classAbstractFunction
- Parameters:
event
- The event.
-
getInstance
public Expression getInstance()
Return a completly separated copy of this function. The copy does no longer share any changeable objects with the original function.- Specified by:
getInstance
in interfaceExpression
- Overrides:
getInstance
in classAbstractExpression
- Returns:
- a copy of this function.
-
getValue
public Object getValue()
Description copied from class:PageFunction
Returns the page number (function value).- Specified by:
getValue
in interfaceExpression
- Overrides:
getValue
in classPageFunction
- Returns:
- the page number.
-
-