|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.Element
org.pentaho.reporting.engine.classic.core.Section
org.pentaho.reporting.engine.classic.core.AbstractReportDefinition
org.pentaho.reporting.engine.classic.core.SubReport
public class SubReport
A subreport element. A subreport can be attached to a root-level band and will be printed afterwards. Subreports have their own tablemodel (queried with the sub-reports's defined query and the master report's data-factory).
A sub-report that has been added to a root-level band will always be printed below the root-level band. Sub-reports can have import and export parameters. The parameter mapping can be defined freely, so a subreport is not required to use the same column names as the parent report. If a global import or export is defined (by adding the parameter mapping "*" => "*") the other defined parameter mappings will be ignored.
Field Summary |
---|
Fields inherited from class org.pentaho.reporting.engine.classic.core.Element |
---|
ANONYMOUS_ELEMENT_PREFIX |
Constructor Summary | |
---|---|
SubReport()
Creates a new subreport instance. |
|
SubReport(InstanceID id)
|
Method Summary | |
---|---|
void |
addExportParameter(String outerName,
String sourceColumn)
Adds an export-parameter mapping to the subreport. |
void |
addInputParameter(String outerName,
String sourceColumn)
Adds an input-parameter mapping to the subreport. |
void |
clearExportParameters()
|
void |
clearInputParameters()
|
Object |
clone()
Clones the report. |
Element |
derive(boolean preserveElementInstanceIds)
Clones the report. |
Expression |
getActivationExpression()
|
DataFactory |
getDataFactory()
Returns the data factory that has been assigned to this report. |
ParameterMapping[] |
getExportMappings()
Returns the parameter mappings for the subreport. |
ParameterMapping[] |
getInputMappings()
Returns the input mappings defined for this subreport. |
PageDefinition |
getPageDefinition()
Returns the page definition assigned to the report definition. |
org.pentaho.reporting.libraries.resourceloader.ResourceManager |
getResourceManager()
|
boolean |
isGlobalExport()
Checks whether a global export is defined. |
boolean |
isGlobalImport()
Checks whether a global import is defined. |
void |
removeExportParameter(String outerName)
Removes the export parameter from the mapping. |
void |
removeInputParameter(String sourceColumn)
Removes the input parameter from the parameter mapping. |
void |
setActivationExpression(Expression activationExpression)
|
void |
setDataFactory(DataFactory dataFactory)
The (optional) data-factory for the subreport. |
void |
setExportMappings(ParameterMapping[] mappings)
|
void |
setInputMappings(ParameterMapping[] mappings)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.pentaho.reporting.engine.classic.core.ReportElement |
---|
getAttribute, getAttributeExpression, getAttributeExpressionNames, getAttributeExpressionNamespaces, getAttributeNames, getAttributeNamespaces, getAttributes, getId, getMetaData, getName, getObjectID, getParentSection, getStyle, getStyleExpression, getStyleExpressions, getTreeLock, setAttribute, setAttributeExpression, setStyleExpression |
Constructor Detail |
---|
public SubReport()
public SubReport(InstanceID id)
Method Detail |
---|
public PageDefinition getPageDefinition()
public Element derive(boolean preserveElementInstanceIds) throws CloneNotSupportedException
derive
in class AbstractReportDefinition
preserveElementInstanceIds
- defines whether this call generates new instance-ids for the derived elements.
Instance-IDs are used by the report processor to recognize reoccurring elements
and must not changed within the report run. Outside of the report processors
new instance ids should be generated at all times to separate
instances and to make them uniquely identifiable.
CloneNotSupportedException
- this should never happen.public Object clone() throws CloneNotSupportedException
clone
in interface DataTarget
clone
in class AbstractReportDefinition
CloneNotSupportedException
- this should never happen.public void addExportParameter(String outerName, String sourceColumn)
outerName
- the name the parameter will get in the master report.sourceColumn
- the source-column in the sub-report.public void removeExportParameter(String outerName)
outerName
- the name of the parameter as it is known in the master report.public ParameterMapping[] getExportMappings()
public void setExportMappings(ParameterMapping[] mappings)
public void addInputParameter(String outerName, String sourceColumn)
outerName
- the name of the parent report's column that provides the data.sourceColumn
- the name under which the parameter will be available in the subreport.public void removeInputParameter(String sourceColumn)
sourceColumn
- the name of the column of the subreport report that acts as source for the input parameter.public void clearInputParameters()
public void clearExportParameters()
public ParameterMapping[] getInputMappings()
public void setInputMappings(ParameterMapping[] mappings)
public boolean isGlobalImport()
public boolean isGlobalExport()
public DataFactory getDataFactory()
AbstractReportDefinition
getDataFactory
in class AbstractReportDefinition
public void setDataFactory(DataFactory dataFactory)
setDataFactory
in class AbstractReportDefinition
dataFactory
- public Expression getActivationExpression()
public void setActivationExpression(Expression activationExpression)
public org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
getResourceManager
in class AbstractReportDefinition
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |