| java.lang.Object org.jfree.report.AbstractReportDefinition org.jfree.report.SubReport
SubReport | public class SubReport extends AbstractReportDefinition (Code) | | 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.
author: Thomas Morgner |
Constructor Summary | |
public | SubReport() Creates a new subreport instance. |
SubReport | public SubReport()(Code) | | Creates a new subreport instance.
|
addExportParameter | public void addExportParameter(String outerName, String sourceColumn)(Code) | | Adds an export-parameter mapping to the subreport. The parameter specified by 'sourceColumn' will be made available
with the name 'outerName' in the parent report.
Parameters: outerName - the name the parameter will get in the master report. Parameters: sourceColumn - the source-column in the sub-report. |
addInputParameter | public void addInputParameter(String outerName, String sourceColumn)(Code) | | Adds an input-parameter mapping to the subreport. Input parameters define how columns that exist in the parent
report get mapped into the subreport.
Input parameter mapping happens only once, so after the report has been started, changes to the parameters will not
pass through to the subreport.
Parameters: outerName - the name of the parent report's column that provides the data. Parameters: sourceColumn - the name under which the parameter will be available in the subreport. |
getExportMappings | public ParameterMapping[] getExportMappings()(Code) | | Returns the parameter mappings for the subreport. The parameter mappings define how columns of the sub-report get
mapped into the master report.
the parameter mappings array. |
getInputMappings | public ParameterMapping[] getInputMappings()(Code) | | Returns the input mappings defined for this subreport.
the input mappings, never null. |
getPageDefinition | public PageDefinition getPageDefinition()(Code) | | Returns the page definition assigned to the report definition. The page definition defines the report area and how
the report is subdivided by the child pages.
null, as subreports have no page-definition at all. |
isGlobalExport | public boolean isGlobalExport()(Code) | | Checks, whether a global export is defined. A global export effectly overrides all other export mappings.
true, if there is a global export defined, false otherwise. |
isGlobalImport | public boolean isGlobalImport()(Code) | | Checks, whether a global import is defined. A global import effectly overrides all other imports.
true, if there is a global import defined, false otherwise. |
removeExportParameter | public void removeExportParameter(String outerName)(Code) | | Removes the export parameter from the mapping.
Parameters: outerName - the name of the parameter as it is known in the master report. |
removeInputParameter | public void removeInputParameter(String sourceColumn)(Code) | | Removes the input parameter from the parameter mapping.
Parameters: sourceColumn - the name of the column of the subreport report that acts as source for the input parameter. |
|
|