JasperTags

JSP tag library for easy inclusion of reports in web applications

Tag reference

report:define

Used to compile/build a report definition file and create a "Report" bean in the specified context

Property Description Required Default value
reportfile defines the name of the reportfile to be built. The name should be filename minus the .jrxml extension. If both an internal and an external report path is defined and there is a report definition with the same name in both paths, the one in the "local" context will be prefered Yes -
var the name of the name of the variable that the report definition will be saved to Yes -
scope defines in which context the variable holding the report definition will be saved. Valid values: page, request, session and application No page
cache Used to enable/disable caching of compiled report definitions No true

report:fill

Makes a 'filled' report based on the specified report definition and datasource

Property Description Required Default value
datasource The datasource where JasperTags is to get the data for the report. If the value of this parameter is a String, JasperTags will do a lookup in the local JNDI context for a java.sql.Datasource with that name. Other valid values are the output of the JSTL sql:dataSource or sql:query tags. If this parameter is not set JasperTags will try to fill the report using the settings in the report definition (for instance for XMLA datasources) No -
report the report to fill with data. The report must already have been defined with the report:define tag Yes -
cache Used to enable/disable caching of filled reports. NOTE: this feature will probably be removed at it might cause memory leaks No false

report:show

Used to render the report output in the JSP. For other formats than HTML, like PDF or XLS, use the ReportServlet

Property Description Required Default value
format which format will the filled report be rendered to. Possible values: html, xml, xls or pdf. Note this attribute will probably be removed as we would rather prefer using the ReportServlet for outputting anything but HTML No html
report the report to render.The report must already have been filled with data using the report:fill tag Yes -
unit Size unit to use for exporting reports to HTML. Valid values: px (pixels) or pt (points). No pt

JasperReports is a trademark for JasperSoft Corporation.

Java is a trademark for Sun Microsystems, Inc.