Report Design Tips

Templates

Style templates are not supported (.jrtx) as this file would need to already exist on the server for the report to be created.  It can't be pre-compiled into the jrxml.

 

Report Pagination

Don't use report-level pagination flag.  It appears to slow down PDF display way down and doesn't seem to change anything.

 

Excel/CSV Export

The design of your report heavily influences how the report will be exported to Excel format (XLS).  Things to consider:

  • Column headers, page headers, footers, etc... may repeat per page when printed, however in excel this makes data analysis of tabular data difficult.
  • Blank lines may be added per page which makes data analysis of tabular data difficult.

 

A list of parameters that can be set that influence XLS exports is on the JasperSoft community wiki.

 

Example:

<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>

<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>

<property name="net.sf.jasperreports.export.xls.ignore.cell.background" value="true"/>

<property name="net.sf.jasperreports.export.xls.ignore.cell.border" value="true"/>

<property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="columnHeader"/>

<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageFooter"/>

<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1" value="columnHeader"/>

<property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.1" value="columnHeader"/>

 

Additionally for CSV exports, it's especially important that the y-location of fields within a band are all the same.  If they aren't, fields will print on different lines in the CSV.

 

 

OpenLMIS: the global initiative for powerful LMIS software