Java Reference
In-Depth Information
As we can see, the value we used for the paramName parameter in the servlet is
displayed in the report.
Report parameters can be assigned values in the report template. That way we can
assign a default value to any parameter that contains a null value. The syntax to
assign a default value to a report parameter is demonstrated in the following
JRXML snippet:
<parameter name="someParam" class="java.lang.String">
new java.lang.String("default parameter value");
In addition to allowing us to send report parameters, all JasperReports reports have
a number of built-in parameters that are always present, without us having to pass
them explicitly. The following table lists all of the built-in report parameters:
Built-in Parameter
Can be used to obtain a reference to the
instance of java.util.Map containing the
parameters for the report.
Can be used to obtain a reference to the
instance of net.sf.jasperreports.
engine.JRDataSource containing the
fields for the report.
Can be used to obtain a reference to the
java.sql.Connection passed to the
report to connect to the database. If no
database connection was passed to the report,
it returns null .
JasperReports allows reports to be exported
to several formats. Some of these formats
are not page oriented, for example,
HTML. Setting the value of IS_IGNORE_
PAGINATION to Boolean.TRUE makes
JasperReports ignore all page-breaking
settings in the report and generates a report
containing a single (and, in the case of reports
with a lot of data, very long) page.
Determines the language used to generate
reports when the report is localized.
Indicates the java.util.ResourceBundle
instance used to localize the report.
Search WWH ::

Custom Search