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 JRBand
protected int
protected Integer
protected RunDirectionEnum
protected JRBand
protected JRBand
protected int
protected int
protected JRDataset[]
Sub datasets of the report.protected JRStyle
protected JRSection
protected String
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected String
protected JRBand
protected int
protected JRDataset
The main dataset of the report.protected String
protected JRBand
protected OrientationEnum
protected JRBand
protected JRBand
protected int
protected int
protected PrintOrderEnum
static final String
static final String
protected int
protected SectionTypeEnum
protected StyleResolver
protected JRStyle[]
protected JRBand
protected JRReportTemplate[]
Report templates.protected JRBand
protected int
protected WhenNoDataTypeEnum
Fields inherited from interface net.sf.jasperreports.engine.JRReport
CONFIG_PROPERTY_WHEN_NO_DATA_TYPE, LANGUAGE_GROOVY, LANGUAGE_JAVA
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JRBaseReport
(JRReport report) JRBaseReport
(JRReport report, JRBaseObjectFactory factory) Constructs a copy of a report.JRBaseReport
(JRReport report, JRExpressionCollector expressionCollector) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
copyTemplates
(JRReport report, JRBaseObjectFactory factory) JRBand[]
int
Gets the number of columns on each pageSpecifies whether columns will be filled from left to right or from right to left.int
Specifies the space between columns on the same page.int
Returns 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 theFormatFactory
interface 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.int
Returns the main report dataset.getName()
Gets the report name.Specifies whether document pages will be rendered in a portrait or landscape layout.int
int
Gets 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.int
Gets 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()
int
getUUID()
Gets an array of report variables.Specifies the report behavior in case of empty datasources.Returns the resource missing handling type.boolean
Checks whether the object has any properties.boolean
Specifies 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.boolean
Decides whether to use pagination when filling the report.boolean
Specifies if the summary section will be printed on a separate last page.boolean
Specifies if the summary section will be accompanied by the page header and footer.boolean
Specifies if the title section will be printed on a separate initial page.void
removeProperty
(String propName) void
setJasperReportsContext
(JasperReportsContext jasperReportsContext) void
setProperty
(String propName, String value) void
setSectionType
(SectionTypeEnum sectionType) void
setWhenNoDataType
(WhenNoDataTypeEnum whenNoDataType) Sets the report behavior in case of empty datasources.void
setWhenResourceMissingType
(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:JRReport
Gets the report name. -
getLanguage
Description copied from interface:JRReport
Gets the report language. Should be Java or Groovy.- Specified by:
getLanguage
in interfaceJRReport
-
getColumnCount
Description copied from interface:JRReport
Gets the number of columns on each page- Specified by:
getColumnCount
in interfaceJRReport
-
getPrintOrder
Description copied from interface:JRReport
Specifies whether columns will be filled horizontally or vertically.- Specified by:
getPrintOrder
in interfaceJRReport
- Returns:
- a value representing one of the print order constants in
PrintOrderEnum
-
getColumnDirection
Description copied from interface:JRReport
Specifies whether columns will be filled from left to right or from right to left.- Specified by:
getColumnDirection
in interfaceJRReport
- Returns:
- a value representing one of the column direction constants in
RunDirectionEnum
-
getPageWidth
public int getPageWidth()- Specified by:
getPageWidth
in interfaceJRReport
-
getPageHeight
public int getPageHeight()- Specified by:
getPageHeight
in interfaceJRReport
-
getOrientation
Description copied from interface:JRReport
Specifies whether document pages will be rendered in a portrait or landscape layout.- Specified by:
getOrientation
in interfaceJRReport
- Returns:
- a value representing one of the orientation constants in
OrientationEnum
-
getWhenNoDataType
Description copied from interface:JRReport
Specifies the report behavior in case of empty datasources.- Specified by:
getWhenNoDataType
in interfaceJRReport
-
setWhenNoDataType
Description copied from interface:JRReport
Sets the report behavior in case of empty datasources.- Specified by:
setWhenNoDataType
in interfaceJRReport
-
getSectionType
Description copied from interface:JRReport
Specifies whether report sections are made of bands or of parts.- Specified by:
getSectionType
in interfaceJRReport
- Returns:
- a value representing one of the section type constants in
SectionTypeEnum
-
setSectionType
-
getColumnWidth
public int getColumnWidth()- Specified by:
getColumnWidth
in interfaceJRReport
-
getColumnSpacing
public int getColumnSpacing()Description copied from interface:JRReport
Specifies the space between columns on the same page.- Specified by:
getColumnSpacing
in interfaceJRReport
-
getLeftMargin
public int getLeftMargin()- Specified by:
getLeftMargin
in interfaceJRReport
-
getRightMargin
public int getRightMargin()- Specified by:
getRightMargin
in interfaceJRReport
-
getTopMargin
public int getTopMargin()- Specified by:
getTopMargin
in interfaceJRReport
-
getBottomMargin
public int getBottomMargin()- Specified by:
getBottomMargin
in interfaceJRReport
-
isTitleNewPage
public boolean isTitleNewPage()Description copied from interface:JRReport
Specifies if the title section will be printed on a separate initial page.- Specified by:
isTitleNewPage
in interfaceJRReport
-
isSummaryNewPage
public boolean isSummaryNewPage()Description copied from interface:JRReport
Specifies if the summary section will be printed on a separate last page.- Specified by:
isSummaryNewPage
in interfaceJRReport
-
getScriptletClass
- Specified by:
getScriptletClass
in interfaceJRReport
-
getFormatFactoryClass
Description copied from interface:JRReport
Gets the name of the class implementing theFormatFactory
interface to use with this report.- Specified by:
getFormatFactoryClass
in interfaceJRReport
-
getResourceBundle
Description copied from interface:JRReport
Gets the base name of the report associated resource bundle.- Specified by:
getResourceBundle
in interfaceJRReport
-
getPropertyNames
Description copied from interface:JRReport
Gets an array of report properties names.- Specified by:
getPropertyNames
in interfaceJRReport
-
getProperty
Description copied from interface:JRReport
Gets a property value- Specified by:
getProperty
in interfaceJRReport
- Parameters:
propName
- the property name
-
setProperty
- Specified by:
setProperty
in interfaceJRReport
-
removeProperty
- Specified by:
removeProperty
in interfaceJRReport
-
getPropertyExpressions
Description copied from interface:JRReport
Returns the list of dynamic/expression-based properties for this report.- Specified by:
getPropertyExpressions
in interfaceJRReport
- Returns:
- an array containing the expression-based properties of this report
-
getImports
Description copied from interface:JRReport
Gets an array of imports (needed if report expression require additional classes in order to compile).- Specified by:
getImports
in interfaceJRReport
-
getDefaultStyle
Description copied from interface:JRDefaultStyleProvider
Returns a default style.- Specified by:
getDefaultStyle
in interfaceJRDefaultStyleProvider
-
getStyles
Description copied from interface:JRReport
Gets an array of report styles. -
getStyleResolver
Description copied from interface:JRDefaultStyleProvider
Returns a style resolver.- Specified by:
getStyleResolver
in interfaceJRDefaultStyleProvider
-
getScriptlets
Gets an array of report scriptlets (excluding the scriptletClass one).- Specified by:
getScriptlets
in interfaceJRReport
-
getParameters
Gets an array of report parameters (including built-in ones).- Specified by:
getParameters
in interfaceJRReport
-
getQuery
-
getFields
Gets an array of report fields. -
getSortFields
Gets an array of sort report fields.- Specified by:
getSortFields
in interfaceJRReport
-
getVariables
Gets an array of report variables.- Specified by:
getVariables
in interfaceJRReport
-
getGroups
-
getBackground
- Specified by:
getBackground
in interfaceJRReport
-
getTitle
-
getPageHeader
- Specified by:
getPageHeader
in interfaceJRReport
-
getColumnHeader
- Specified by:
getColumnHeader
in interfaceJRReport
-
getDetailSection
- Specified by:
getDetailSection
in interfaceJRReport
-
getSummary
- Specified by:
getSummary
in interfaceJRReport
-
getWhenResourceMissingType
Description copied from interface:JRReport
Returns the resource missing handling type.- Specified by:
getWhenResourceMissingType
in interfaceJRReport
-
setWhenResourceMissingType
Description copied from interface:JRReport
Sets the resource missing handling type.- Specified by:
setWhenResourceMissingType
in interfaceJRReport
- Parameters:
whenResourceMissingType
- the resource missing handling type
-
getMainDataset
Description copied from interface:JRReport
Returns the main report dataset.The main report dataset consists of all parameters, fields, variables and groups of the report.
- Specified by:
getMainDataset
in interfaceJRReport
- Returns:
- the main report dataset
-
getDatasets
Description copied from interface:JRReport
Returns the datasets of this report.- Specified by:
getDatasets
in interfaceJRReport
- Returns:
- the datasets of this report
-
isIgnorePagination
public boolean isIgnorePagination()Description copied from interface:JRReport
Decides whether to use pagination when filling the report.If set to
true
the report will be generated on one long page.The design attribute can be overridden at fill time by the
IS_IGNORE_PAGINATION
parameter.- Specified by:
isIgnorePagination
in interfaceJRReport
- Returns:
- whether to use pagination when filling the report
-
hasProperties
public boolean hasProperties()Description copied from interface:JRPropertiesHolder
Checks whether the object has any properties.- Specified by:
hasProperties
in interfaceJRPropertiesHolder
- Returns:
- whether the object has any properties
-
getPropertiesMap
Description copied from interface:JRPropertiesHolder
Returns this object's properties map.- Specified by:
getPropertiesMap
in interfaceJRPropertiesHolder
- Returns:
- this object's properties map
-
getParentProperties
Description copied from interface:JRPropertiesHolder
Returns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentProperties
in interfaceJRPropertiesHolder
- Returns:
- the parent properties holder, or
null
if no parent
-
getTemplates
Description copied from interface:JRReport
Returns 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:
getTemplates
in interfaceJRReport
- Returns:
- the list of report templates, or
null
if none - See Also:
-
getNoData
-
getAllBands
-
getUUID
- Specified by:
getUUID
in interfaceJRIdentifiable
-
getEventSupport
Description copied from interface:JRChangeEventsSupport
Returns the property change support object for this instance.- Specified by:
getEventSupport
in interfaceJRChangeEventsSupport
- Returns:
- the property change support object for this instance
-