Using Parameters

Parameters are values usually passed to the report from the application that originally requested it. They can be used for configuring report features at generation (like the value to use in an SQL query), or maybe to supply additional data to the report that's not provided by the data source (like a custom report title, an application-specific path for images).

Report parameters have many functions in a report. They can be used in the "where" condition of an SQL query, or to provide additional data to the report (like the value of a title or name of the user that executed the report).

A parameter is defined by a name and a Class, which is a Java class type. For example a parameter of type java.sql.Connection may be used to populate a subreport, while a simple java.lang.Boolean parameter may be used to show or hide a section of the report.

This chapter contains the following sections:

Managing Parameters
Default Parameters
Using Parameters in Queries
Parameters Prompt