public class MasterReport extends AbstractReportDefinition
TableModel
, Expression
s or ReportParameterValues
. The report is made up of 'bands', which are used repeatedly as necessary to generate small
sections of the report.
getReportHeader()
and
getReportFooter()
getPageHeader()
and
getPageFooter()
getItemBand()
getNoDataBand()
getWaterMark()
getGroup(int groupLevel)
. The group header and footer are accessible through
the group object, so use getGroup(int groupLevel).getGroupHeader() and getGroup(int
groupLevel).getGroupFooter().
All report elements share the same stylesheet collection. Report elements cannot be shared between two different
report instances. Adding a report element to one band will remove it from the other one.
For dynamic computation of content you can add Expression
s and Function
s
to the report.
Creating a new instance of JFreeReport seems to lock down the JDK on some Windows Systems, where no printer driver is
installed. To prevent that behaviour on these systems, you can set the Configuration
key
"org.pentaho.reporting.engine.classic.core.NoPrinterAvailable" to "false" and JFreeReport will use a hardcoded
default page format instead.
A JFreeReport object always acts as Master-Report. The JFreeReport object defines the global report-configuration,
the report's datasource (through the DataFactory property) and the ResourceBundleFactory (for localization).
Modifier and Type | Field and Description |
---|---|
static String |
REPORT_DATE_PROPERTY
Key for the 'report date' property.
|
ANONYMOUS_ELEMENT_PREFIX
Constructor and Description |
---|
MasterReport()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
MasterReport |
clone()
Clones the report.
|
static ResourceBundleFactory |
computeAndInitResourceBundleFactory(ResourceBundleFactory resourceBundleFactory,
ReportEnvironment environment) |
MasterReport |
derive(boolean preserveElementInstanceIds)
Creates a deep copy of this element and regenerates all instance-ids.
|
org.pentaho.reporting.libraries.docbundle.DocumentBundle |
getBundle() |
Integer |
getCompatibilityLevel() |
org.pentaho.reporting.libraries.base.config.Configuration |
getConfiguration()
Returns the report's configuration.
|
DataFactory |
getDataFactory()
Returns the data factory that has been assigned to this report.
|
ReportDefinition |
getMasterReport()
Returns the master-report element.
|
ModifiableReportParameterDefinition |
getModifiableParameterDefinition() |
PageDefinition |
getPageDefinition()
Returns the logical page definition for this report.
|
ReportParameterDefinition |
getParameterDefinition() |
ReportParameterValues |
getParameterValues() |
org.pentaho.reporting.libraries.base.config.ModifiableConfiguration |
getReportConfiguration()
Returns the report configuration.
|
ReportEnvironment |
getReportEnvironment() |
org.pentaho.reporting.libraries.resourceloader.ResourceManager |
getResourceManager()
Returns the resource manager that was responsible for loading the report.
|
ElementStyleDefinition |
getStyleDefinition() |
org.pentaho.reporting.libraries.resourceloader.ResourceKey |
getStyleSheetReference() |
String |
getTitle() |
boolean |
isStrictLegacyMode() |
void |
setBundle(org.pentaho.reporting.libraries.docbundle.DocumentBundle bundle) |
void |
setCompatibilityLevel(Integer level) |
void |
setDataFactory(DataFactory dataFactory)
Sets the data factory for the report.
|
void |
setPageDefinition(PageDefinition format)
Defines the logical page definition for this report.
|
void |
setParameterDefinition(ReportParameterDefinition parameterDefinition) |
void |
setReportEnvironment(ReportEnvironment reportEnvironment) |
void |
setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory)
Redefines the resource bundle factory for the report.
|
void |
setResourceManager(org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager)
Assigns a new resource manager or clears the current one.
|
void |
setStrictLegacyMode(boolean strict) |
void |
setStyleDefinition(ElementStyleDefinition styleDefinition) |
void |
setStyleSheetReference(org.pentaho.reporting.libraries.resourceloader.ResourceKey styleSheetReference) |
void |
updateLegacyConfiguration() |
addExpression, addGroup, addGroup, addPreProcessor, addReportModelListener, addStructureFunction, fireModelLayoutChanged, getContentBase, getCrosstabCellBody, getDataSchemaDefinition, getDatasourceChangeTracker, getDefaultStyleSheet, getDefinitionSource, getDetailsFooter, getDetailsHeader, getElement, getElementCount, getExpressions, getGroup, getGroupByName, getGroupCount, getItemBand, getNoDataBand, getNonVisualsChangeTracker, getPageFooter, getPageHeader, getPreProcessor, getPreProcessorCount, getPreProcessors, getQuery, getQueryLimit, getQueryTimeout, getRelationalGroup, getReportDefinition, getReportFooter, getReportHeader, getResourceBundleFactory, getRootGroup, getStructureFunction, getStructureFunctionCount, getStructureFunctions, getWatermark, removeExpression, removeGroup, removeGroup, removePreProcessor, removeReportModelListener, removeStructureFunction, setContentBase, setDataSchemaDefinition, setDefinitionSource, setElementAt, setExpressions, setPageFooter, setPageHeader, setQuery, setQueryLimit, setQueryTimeout, setReportFooter, setReportHeader, setRootGroup, setWatermark
copyAttributes, copyInto, derive, getAttribute, getAttributeExpression, getAttributeExpressionNames, getAttributeExpressionNamespaces, getAttributeExpressions, getAttributeNames, getAttributeNamespaces, getAttributes, getChangeTracker, getChildElementByType, getChildElementsByName, getChildElementsByType, getComputedStyle, getDataSource, getElementContext, getElementType, getElementTypeName, getFirstAttribute, getHRefTarget, getId, getMetaData, getName, getObjectID, getParent, getParentSection, getStyle, getStyleExpression, getStyleExpressions, getTreeLock, isDynamicContent, isVisible, notifyNodeChildAdded, notifyNodeChildRemoved, notifyNodePropertiesChanged, notifyNodePropertiesChanged, notifyNodeStructureChanged, setAttribute, setAttribute, setAttributeExpression, setComputedStyle, setDataSource, setDynamicContent, setElementType, setHRefTarget, setId, setName, setStyleExpression, setVisible, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttribute, getAttributeExpression, getAttributeExpressionNames, getAttributeExpressionNamespaces, getAttributeNames, getAttributeNamespaces, getAttributes, getChangeTracker, getChildElementByType, getChildElementsByName, getChildElementsByType, getComputedStyle, getElementContext, getElementType, getFirstAttribute, getId, getMetaData, getName, getObjectID, getParentSection, getStyle, getStyleExpression, getStyleExpressions, getTreeLock, setAttribute, setAttribute, setAttributeExpression, setComputedStyle, setStyleExpression
public static final String REPORT_DATE_PROPERTY
public MasterReport()
public static ResourceBundleFactory computeAndInitResourceBundleFactory(ResourceBundleFactory resourceBundleFactory, ReportEnvironment environment) throws ReportProcessingException
ReportProcessingException
public void setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory)
setResourceBundleFactory
in class AbstractReportDefinition
resourceBundleFactory
- the new resource bundle factory, never null.NullPointerException
- if the given ResourceBundleFactory is null.public org.pentaho.reporting.libraries.docbundle.DocumentBundle getBundle()
public void setBundle(org.pentaho.reporting.libraries.docbundle.DocumentBundle bundle)
public ReportParameterDefinition getParameterDefinition()
public void setParameterDefinition(ReportParameterDefinition parameterDefinition)
public ModifiableReportParameterDefinition getModifiableParameterDefinition()
public ReportEnvironment getReportEnvironment()
public void setReportEnvironment(ReportEnvironment reportEnvironment)
public String getTitle()
public PageDefinition getPageDefinition()
public void setPageDefinition(PageDefinition format)
Configuration
key "org.pentaho.reporting.engine.classic.core.NoPrinterAvailable" to "false" and JFreeReport will
use a hardcoded default page format instead.format
- the default format (null
permitted).public DataFactory getDataFactory()
getDataFactory
in class AbstractReportDefinition
public void setDataFactory(DataFactory dataFactory)
setDataFactory
in class AbstractReportDefinition
dataFactory
- the data factory for the report, never null.public MasterReport clone()
clone
in interface DataTarget
clone
in class AbstractReportDefinition
public MasterReport derive(boolean preserveElementInstanceIds)
Element
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.public org.pentaho.reporting.libraries.base.config.ModifiableConfiguration getReportConfiguration()
public org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
public org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
getResourceManager
in class AbstractReportDefinition
public void setResourceManager(org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager)
resourceManager
- the new resource manager or null.public ReportParameterValues getParameterValues()
public Integer getCompatibilityLevel()
public void setCompatibilityLevel(Integer level)
public void updateLegacyConfiguration()
public ElementStyleDefinition getStyleDefinition()
public void setStyleDefinition(ElementStyleDefinition styleDefinition)
public org.pentaho.reporting.libraries.resourceloader.ResourceKey getStyleSheetReference()
public void setStyleSheetReference(org.pentaho.reporting.libraries.resourceloader.ResourceKey styleSheetReference)
public boolean isStrictLegacyMode()
public void setStrictLegacyMode(boolean strict)
public ReportDefinition getMasterReport()
Element
getMasterReport
in class Element