Package net.sf.jasperreports.engine.base
Class JRBaseReport
java.lang.Object
net.sf.jasperreports.engine.base.JRBaseReport
- All Implemented Interfaces:
Serializable,JRChangeEventsSupport,JRDefaultStyleProvider,JRIdentifiable,JRPropertiesHolder,JRReport
- Direct Known Subclasses:
JasperDesign,JasperReport
Base class that implements the
JRReport interface.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRBandprotected intprotected Integerprotected RunDirectionEnumprotected JRBandprotected JRBandprotected intprotected intprotected JRDataset[]Sub datasets of the report.protected JRStyleprotected JRSectionprotected Stringprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected Stringprotected JRBandprotected intprotected JRDatasetThe main dataset of the report.protected Stringprotected JRBandprotected OrientationEnumprotected JRBandprotected JRBandprotected intprotected intprotected PrintOrderEnumstatic final Stringstatic final Stringprotected intprotected SectionTypeEnumprotected StyleResolverprotected JRStyle[]protected JRBandprotected JRReportTemplate[]Report templates.protected JRBandprotected intprotected WhenNoDataTypeEnumFields inherited from interface net.sf.jasperreports.engine.JRReport
CONFIG_PROPERTY_WHEN_NO_DATA_TYPE, LANGUAGE_GROOVY, LANGUAGE_JAVA -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJRBaseReport(JRReport report) JRBaseReport(JRReport report, JRBaseObjectFactory factory) Constructs a copy of a report.JRBaseReport(JRReport report, JRExpressionCollector expressionCollector) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyTemplates(JRReport report, JRBaseObjectFactory factory) JRBand[]intGets the number of columns on each pageSpecifies whether columns will be filled from left to right or from right to left.intSpecifies the space between columns on the same page.intReturns the datasets of this report.Returns a default style.Returns the property change support object for this instance.JRField[]Gets an array of report fields.Gets the name of the class implementing theFormatFactoryinterface to use with this report.JRGroup[]String[]Gets an array of imports (needed if report expression require additional classes in order to compile).Gets the report language.intReturns the main report dataset.getName()Gets the report name.Specifies whether document pages will be rendered in a portrait or landscape layout.intintGets an array of report parameters (including built-in ones).Returns the parent properties holder, whose properties are used as defaults for this object.Specifies whether columns will be filled horizontally or vertically.Returns this object's properties map.getProperty(String propName) Gets a property valueReturns the list of dynamic/expression-based properties for this report.String[]Gets an array of report properties names.getQuery()Gets the base name of the report associated resource bundle.intGets an array of report scriptlets (excluding the scriptletClass one).Specifies whether report sections are made of bands or of parts.Gets an array of sort report fields.Returns a style resolver.JRStyle[]Gets an array of report styles.Returns the list of report templates.getTitle()intgetUUID()Gets an array of report variables.Specifies the report behavior in case of empty datasources.Returns the resource missing handling type.booleanChecks whether the object has any properties.booleanSpecifies if the column footer section will be printed at the bottom of the column or if it will immediately follow the last detail or group footer printed on the current column.booleanDecides whether to use pagination when filling the report.booleanSpecifies if the summary section will be printed on a separate last page.booleanSpecifies if the summary section will be accompanied by the page header and footer.booleanSpecifies if the title section will be printed on a separate initial page.voidremoveProperty(String propName) voidsetJasperReportsContext(JasperReportsContext jasperReportsContext) voidsetProperty(String propName, String value) voidsetSectionType(SectionTypeEnum sectionType) voidsetWhenNoDataType(WhenNoDataTypeEnum whenNoDataType) Sets the report behavior in case of empty datasources.voidsetWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType) Sets the resource missing handling type.
-
Field Details
-
PROPERTY_WHEN_NO_DATA_TYPE
- See Also:
-
PROPERTY_SECTION_TYPE
- See Also:
-
name
-
language
-
columnCount
-
printOrder
-
columnDirection
-
pageWidth
protected int pageWidth -
pageHeight
protected int pageHeight -
orientation
-
whenNoDataType
-
sectionType
-
columnWidth
protected int columnWidth -
columnSpacing
protected int columnSpacing -
leftMargin
protected int leftMargin -
rightMargin
protected int rightMargin -
topMargin
protected int topMargin -
bottomMargin
protected int bottomMargin -
isTitleNewPage
protected boolean isTitleNewPage -
isSummaryNewPage
protected boolean isSummaryNewPage -
ignorePagination
protected boolean ignorePagination -
formatFactoryClass
-
importsSet
-
templates
Report templates. -
defaultStyle
-
styles
-
styleResolver
-
mainDataset
The main dataset of the report. -
datasets
Sub datasets of the report. -
background
-
title
-
pageHeader
-
columnHeader
-
detailSection
-
summary
-
noData
-
-
Constructor Details
-
JRBaseReport
protected JRBaseReport() -
JRBaseReport
-
JRBaseReport
Constructs a copy of a report. -
JRBaseReport
-
-
Method Details
-
copyTemplates
-
setJasperReportsContext
-
getName
Description copied from interface:JRReportGets the report name. -
getLanguage
Description copied from interface:JRReportGets the report language. Should be Java or Groovy.- Specified by:
getLanguagein interfaceJRReport
-
getColumnCount
Description copied from interface:JRReportGets the number of columns on each page- Specified by:
getColumnCountin interfaceJRReport
-
getPrintOrder
Description copied from interface:JRReportSpecifies whether columns will be filled horizontally or vertically.- Specified by:
getPrintOrderin interfaceJRReport- Returns:
- a value representing one of the print order constants in
PrintOrderEnum
-
getColumnDirection
Description copied from interface:JRReportSpecifies whether columns will be filled from left to right or from right to left.- Specified by:
getColumnDirectionin interfaceJRReport- Returns:
- a value representing one of the column direction constants in
RunDirectionEnum
-
getPageWidth
public int getPageWidth()- Specified by:
getPageWidthin interfaceJRReport
-
getPageHeight
public int getPageHeight()- Specified by:
getPageHeightin interfaceJRReport
-
getOrientation
Description copied from interface:JRReportSpecifies whether document pages will be rendered in a portrait or landscape layout.- Specified by:
getOrientationin interfaceJRReport- Returns:
- a value representing one of the orientation constants in
OrientationEnum
-
getWhenNoDataType
Description copied from interface:JRReportSpecifies the report behavior in case of empty datasources.- Specified by:
getWhenNoDataTypein interfaceJRReport
-
setWhenNoDataType
Description copied from interface:JRReportSets the report behavior in case of empty datasources.- Specified by:
setWhenNoDataTypein interfaceJRReport
-
getSectionType
Description copied from interface:JRReportSpecifies whether report sections are made of bands or of parts.- Specified by:
getSectionTypein interfaceJRReport- Returns:
- a value representing one of the section type constants in
SectionTypeEnum
-
setSectionType
-
getColumnWidth
public int getColumnWidth()- Specified by:
getColumnWidthin interfaceJRReport
-
getColumnSpacing
public int getColumnSpacing()Description copied from interface:JRReportSpecifies the space between columns on the same page.- Specified by:
getColumnSpacingin interfaceJRReport
-
getLeftMargin
public int getLeftMargin()- Specified by:
getLeftMarginin interfaceJRReport
-
getRightMargin
public int getRightMargin()- Specified by:
getRightMarginin interfaceJRReport
-
getTopMargin
public int getTopMargin()- Specified by:
getTopMarginin interfaceJRReport
-
getBottomMargin
public int getBottomMargin()- Specified by:
getBottomMarginin interfaceJRReport
-
isTitleNewPage
public boolean isTitleNewPage()Description copied from interface:JRReportSpecifies if the title section will be printed on a separate initial page.- Specified by:
isTitleNewPagein interfaceJRReport
-
isSummaryNewPage
public boolean isSummaryNewPage()Description copied from interface:JRReportSpecifies if the summary section will be printed on a separate last page.- Specified by:
isSummaryNewPagein interfaceJRReport
-
getScriptletClass
- Specified by:
getScriptletClassin interfaceJRReport
-
getFormatFactoryClass
Description copied from interface:JRReportGets the name of the class implementing theFormatFactoryinterface to use with this report.- Specified by:
getFormatFactoryClassin interfaceJRReport
-
getResourceBundle
Description copied from interface:JRReportGets the base name of the report associated resource bundle.- Specified by:
getResourceBundlein interfaceJRReport
-
getPropertyNames
Description copied from interface:JRReportGets an array of report properties names.- Specified by:
getPropertyNamesin interfaceJRReport
-
getProperty
Description copied from interface:JRReportGets a property value- Specified by:
getPropertyin interfaceJRReport- Parameters:
propName- the property name
-
setProperty
- Specified by:
setPropertyin interfaceJRReport
-
removeProperty
- Specified by:
removePropertyin interfaceJRReport
-
getPropertyExpressions
Description copied from interface:JRReportReturns the list of dynamic/expression-based properties for this report.- Specified by:
getPropertyExpressionsin interfaceJRReport- Returns:
- an array containing the expression-based properties of this report
-
getImports
Description copied from interface:JRReportGets an array of imports (needed if report expression require additional classes in order to compile).- Specified by:
getImportsin interfaceJRReport
-
getDefaultStyle
Description copied from interface:JRDefaultStyleProviderReturns a default style.- Specified by:
getDefaultStylein interfaceJRDefaultStyleProvider
-
getStyles
Description copied from interface:JRReportGets an array of report styles. -
getStyleResolver
Description copied from interface:JRDefaultStyleProviderReturns a style resolver.- Specified by:
getStyleResolverin interfaceJRDefaultStyleProvider
-
getScriptlets
Gets an array of report scriptlets (excluding the scriptletClass one).- Specified by:
getScriptletsin interfaceJRReport
-
getParameters
Gets an array of report parameters (including built-in ones).- Specified by:
getParametersin interfaceJRReport
-
getQuery
-
getFields
Gets an array of report fields. -
getSortFields
Gets an array of sort report fields.- Specified by:
getSortFieldsin interfaceJRReport
-
getVariables
Gets an array of report variables.- Specified by:
getVariablesin interfaceJRReport
-
getGroups
-
getBackground
- Specified by:
getBackgroundin interfaceJRReport
-
getTitle
-
getPageHeader
- Specified by:
getPageHeaderin interfaceJRReport
-
getColumnHeader
- Specified by:
getColumnHeaderin interfaceJRReport
-
getDetailSection
- Specified by:
getDetailSectionin interfaceJRReport
-
getSummary
- Specified by:
getSummaryin interfaceJRReport
-
getWhenResourceMissingType
Description copied from interface:JRReportReturns the resource missing handling type.- Specified by:
getWhenResourceMissingTypein interfaceJRReport
-
setWhenResourceMissingType
Description copied from interface:JRReportSets the resource missing handling type.- Specified by:
setWhenResourceMissingTypein interfaceJRReport- Parameters:
whenResourceMissingType- the resource missing handling type
-
getMainDataset
Description copied from interface:JRReportReturns the main report dataset.The main report dataset consists of all parameters, fields, variables and groups of the report.
- Specified by:
getMainDatasetin interfaceJRReport- Returns:
- the main report dataset
-
getDatasets
Description copied from interface:JRReportReturns the datasets of this report.- Specified by:
getDatasetsin interfaceJRReport- Returns:
- the datasets of this report
-
isIgnorePagination
public boolean isIgnorePagination()Description copied from interface:JRReportDecides whether to use pagination when filling the report.If set to
truethe report will be generated on one long page.The design attribute can be overridden at fill time by the
IS_IGNORE_PAGINATIONparameter.- Specified by:
isIgnorePaginationin interfaceJRReport- Returns:
- whether to use pagination when filling the report
-
hasProperties
public boolean hasProperties()Description copied from interface:JRPropertiesHolderChecks whether the object has any properties.- Specified by:
hasPropertiesin interfaceJRPropertiesHolder- Returns:
- whether the object has any properties
-
getPropertiesMap
Description copied from interface:JRPropertiesHolderReturns this object's properties map.- Specified by:
getPropertiesMapin interfaceJRPropertiesHolder- Returns:
- this object's properties map
-
getParentProperties
Description copied from interface:JRPropertiesHolderReturns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentPropertiesin interfaceJRPropertiesHolder- Returns:
- the parent properties holder, or
nullif no parent
-
getTemplates
Description copied from interface:JRReportReturns the list of report templates. A report template is an expression which resolves at runtime to atemplate. Templates include styles which can be used in the report. The order in which the templates are included in the report is important:- A style's parent must appear before the style itself.
- A style overrides styles with the same name that are placed before it. Also, report styles override templates styles with the same name.
- Specified by:
getTemplatesin interfaceJRReport- Returns:
- the list of report templates, or
nullif none - See Also:
-
getNoData
-
getAllBands
-
getUUID
- Specified by:
getUUIDin interfaceJRIdentifiable
-
getEventSupport
Description copied from interface:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-