Default Parameters

JasperReports provides some built-in parameters (internal to the reporting engine). You can read the built-in parameters, but you can't modify or delete them. Some important built-in parameters are:

REPORT_CONNECTION - For a report using JDBC, this parameter holds the JDBC connection used to run the SQL query.
REPORT_DATA_SOURCE - This parameter contains the data source used to fill the report (if available)
REPORT_LOCALE - This parameter contains the Locale used to fill the report.

Some built-in parameters are specific to a query language. For example if you're using the Hibernate query language, the reports automatically includes the HIBERNATE_SESSION parameter that holds the Hibernate session for the HQL query.

The built-in parameters are:

JasperReports Default Parameters

Parameter

Description

REPORT_CONTEXT

 

REPORT_PARAMETERS_MAP

This is the java.util.Map passed to the fillReport method; it contains the parameter values defined by the user.

JASPER_REPORT

 

REPORT_CONNECTION

This is the JDBC connection passed to the report when the report is created through an SQL query.

REPORT_MAX_COUNT

This is limits the number of records filling a report. If no value is provided, no limit is set.

REPORT_DATA_SOURCE

This is the data source used by the report when it's not using a JDBC connection.

REPORT_SCRIPTLET

This represents the scriptlet instance used during report creation. If no scriptlet is specified, this parameter uses an instance of net.sf.jasperreports.engine.JRDefaultScriptlet.

REPORT_LOCALE

This is specifies the locale used to fill the report. If no locale is provided, the system default is used.

REPORT_RESOURCE_BUNDLE

This is the resource bundle loaded for this report.

REPORT_TIME_ZONE

This is used to set the time zone used to fill the report. If no value is provided, the system default is used.

REPORT_FORMAT_FACTORY

This is an instance of a net.sf.jasperreports.engine.util.FormatFactory. The user can replace the default one and specify a custom version using a parameter. Another way to use a particular format factory is by setting the report property format factory class.

REPORT_CLASS_LOADER

This parameter can be used to set the class loader to use when filling the report.

REPORT_URL_HANDLER_FACTORY

Class used to create URL handlers. If specified, it replaces the default.

REPORT_FILE_RESOLVER

This is an instance of net.sf.jasperreports.engine.util.FileResolver used to resolve resource locations that can be passed to the report in order to replace the default implementation.

REPORT_TEMPLATES

This is an optional collection of styles (JRTemplate) that can be used in addition to those defined in the report.

SORT_FIELDS

 

FILTER

 

REPORT_VIRTUALIZER

This defines the class for the report filler that implements the JRVirtualizer interface for filling the report.

IS_IGNORE_PAGINATION

You can switch the pagination system on and off with this parameter (it must be a Boolean object). By default, pagination is used except when exporting to HTML and Excel formats.

Version: 
Feedback
randomness