org.pentaho.reporting.engine.classic.core.function.sys
Class SheetNameFunction
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.AbstractElementFormatFunction
org.pentaho.reporting.engine.classic.core.function.sys.SheetNameFunction
- All Implemented Interfaces:
- Serializable, Cloneable, EventListener, PageEventListener, ReportListener, Expression, Function, LayoutProcessorFunction, StructureFunction
public class SheetNameFunction
- extends AbstractElementFormatFunction
- implements StructureFunction
This function is used to generate sheet names into table exports. Sheet names are generated on page breaks and have
different representations depending the export type.
To use this functionnality report configuration must set
the property DECALRED_SHEETNAME_FUNCTION_KEY to point to an existing function or property accessible within
the report.
As for example using simple report definition:
<report>
<configuration>
<!-- where sheetNameExpression is pointing to a valid function declared in this report -->
<property name="org.pentaho.reporting.engine.classic.core.targets.table.TableWriter.SheetNameFunction">sheetNameExpression</property>
</configuration>
...
</report>
This way of defining a sheetname for elements is deprecated. Sheetnames should be declared or computed directly on
the bands by specifiing a sheetname using the "computed-sheetname" style-property.
- Author:
- Cedric Pronzato
- See Also:
- Serialized Form
| Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction |
getElement, groupFinished, groupStarted, itemsAdvanced, itemsFinished, itemsStarted, pageFinished, pageStarted, reportFinished, reportStarted, setElement |
| Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression |
clone, getDataRow, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime |
| Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression |
clone, getDataRow, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime |
SheetNameFunction
public SheetNameFunction()
- Default constructor.
reportInitialized
public void reportInitialized(ReportEvent event)
- Description copied from class:
AbstractElementFormatFunction
- Receives notification that report generation initializes the current run.
The event carries a
ReportState.Started state. Use this to initialize the report.
- Specified by:
reportInitialized in interface ReportListener- Overrides:
reportInitialized in class AbstractElementFormatFunction
- Parameters:
event - The event.
getDependencyLevel
public int getDependencyLevel()
- Overrides the dependency level to only execute this function on the pagination and content-generation level.
- Specified by:
getDependencyLevel in interface Expression- Overrides:
getDependencyLevel in class AbstractExpression
- Returns:
- LayoutProcess.LEVEL_PAGINATE.
getProcessingPriority
public int getProcessingPriority()
- Specified by:
getProcessingPriority in interface StructureFunction
getValue
public Object getValue()
- Structure functions do not care of the result so this method should never be called.
- Specified by:
getValue in interface Expression- Overrides:
getValue in class AbstractElementFormatFunction
- Returns:
null