Class JasperReport
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseReport
-
- net.sf.jasperreports.engine.JasperReport
-
- All Implemented Interfaces:
Serializable
,JRChangeEventsSupport
,JRDefaultStyleProvider
,JRIdentifiable
,JRPropertiesHolder
,JRReport
- Direct Known Subclasses:
TableJasperReport
public class JasperReport extends JRBaseReport
Instances of this class represent compiled report template objects. They are obtained only through the JasperReports report compilation process and are ready to use for filling with data and report generation.Through compilation, along with various consistency checks and rearrangements of the report elements for more rapid performance in the application, the library creates an on-the-fly class file (or a script, depending on the type of the report compiler used) containing all the report expressions (such as report variables expressions, text field and image expressions, and group expressions). This class or script is used to evaluate report expressions during the report-filling process at runtime.
The main difference between a compiled report and a report design is that reports are already compiled and validated, so many characteristics are read only.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseReport
background, bottomMargin, columnCount, columnDirection, columnFooter, columnHeader, columnSpacing, columnWidth, datasets, defaultStyle, detailSection, formatFactoryClass, ignorePagination, importsSet, isFloatColumnFooter, isSummaryNewPage, isSummaryWithPageHeaderAndFooter, isTitleNewPage, language, lastPageFooter, leftMargin, mainDataset, name, noData, orientation, pageFooter, pageHeader, pageHeight, pageWidth, printOrder, PROPERTY_SECTION_TYPE, PROPERTY_WHEN_NO_DATA_TYPE, rightMargin, sectionType, styleResolver, styles, summary, templates, title, topMargin, whenNoDataType
-
Fields inherited from interface net.sf.jasperreports.engine.JRReport
CONFIG_PROPERTY_WHEN_NO_DATA_TYPE, LANGUAGE_GROOVY, LANGUAGE_JAVA
-
-
Constructor Summary
Constructors Constructor Description JasperReport(JRReport report, String compilerClass, Serializable compileData, JRBaseObjectFactory factory, String compileNameSuffix)
JasperReport(JRReport report, String compilerClass, Serializable compileData, JRExpressionCollector expressionCollector, String compileNameSuffix)
Constructs a report by specifying the template report and compile information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Serializable
getCompileData()
Returns data resulted from the expression evaluators compilation.String
getCompileNameSuffix()
Returns the suffix of the class/unit names generated at report compilation.String
getCompilerClass()
Returns the name of the compiler class used to compile this report.-
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseReport
copyTemplates, getAllBands, getBackground, getBottomMargin, getColumnCount, getColumnDirection, getColumnFooter, getColumnHeader, getColumnSpacing, getColumnWidth, getDatasets, getDefaultStyle, getDetailSection, getEventSupport, getFields, getFormatFactoryClass, getGroups, getImports, getLanguage, getLastPageFooter, getLeftMargin, getMainDataset, getName, getNoData, getOrientation, getPageFooter, getPageHeader, getPageHeight, getPageWidth, getParameters, getParentProperties, getPrintOrder, getPropertiesMap, getProperty, getPropertyExpressions, getPropertyNames, getQuery, getResourceBundle, getRightMargin, getScriptletClass, getScriptlets, getSectionType, getSortFields, getStyleResolver, getStyles, getSummary, getTemplates, getTitle, getTopMargin, getUUID, getVariables, getWhenNoDataType, getWhenResourceMissingType, hasProperties, isFloatColumnFooter, isIgnorePagination, isSummaryNewPage, isSummaryWithPageHeaderAndFooter, isTitleNewPage, removeProperty, setJasperReportsContext, setProperty, setSectionType, setWhenNoDataType, setWhenResourceMissingType
-
-
-
-
Constructor Detail
-
JasperReport
public JasperReport(JRReport report, String compilerClass, Serializable compileData, JRExpressionCollector expressionCollector, String compileNameSuffix)
Constructs a report by specifying the template report and compile information.- Parameters:
report
- the report templatecompilerClass
- the name of the class used to compile the reportcompileData
- the report/main dataset compile dataexpressionCollector
- instance used to collect expressions from the report designcompileNameSuffix
- unique string used to distinguish between distinct compilations of reports having the same nameThe collector is used to fetch the generated expression IDs.
-
JasperReport
public JasperReport(JRReport report, String compilerClass, Serializable compileData, JRBaseObjectFactory factory, String compileNameSuffix)
-
-
Method Detail
-
getCompilerClass
public String getCompilerClass()
Returns the name of the compiler class used to compile this report.The compiler is used to instantiate expression evaluators.
- Returns:
- the name of the compiler class used to compile this report
-
getCompileData
public Serializable getCompileData()
Returns data resulted from the expression evaluators compilation.This data is used to create expression evaluators for report filling.
- Returns:
- expression evaluators compiled data
-
getCompileNameSuffix
public String getCompileNameSuffix()
Returns the suffix of the class/unit names generated at report compilation.This is used to distinguish between disctinct compilations of reports having the same name.
- Returns:
- the suffix of the class/unit names generated at report compilation
-
-