Exclude Report Section When Exporting in Jaspersoft
We often come across a situation where we need to eliminate a specific section of the report from getting printed in the Jasper exports in any format. Jasper has a few sets of properties using which in your report it becomes quite easy to achieve this. Here in this blog, I am listing down few properties using which one can suppress the different sections of a report from printing in the report export:
Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.
- net.sf.jasperreports.export.{format}.exclude.key.{suffix}
Possible values for the {format} token are pdf, html, xls, xlsx, rtf, odt, ods, csv and txt. The {suffix} token can be either the element’s key value or an arbitrary string. The value of the property, if defined, should be the element’s key value. If the property has no value, its suffix will be assumed as a value.
Similarly, we can eliminate the specific element from getting exported by adding this property.
- Based on the report elements origin information, there’s property with which we can eliminate the specific section from the report exports:
{suffix} : band, group, report
{format}: pdf, html, xls, rtf, odt, csv, txt
net.sf.jasperreports.export.{format}.exclude.origin.{suffix}.{arbitrary_name}
net.sf.jasperreports.export.{format}.exclude.origin.keep.first.{suffix}.{arbitrary_name}
To suppress column header band from the XLS export but to keep only its first occurrence, users need to code the following property:
net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.3=columnHeader
A new property needs to be added so that the filter applies to all columnHeader bands in all subreports, regardless of their suffix. This new property feature is only available in Jaspersoft product version 4.7.1 and newer.
net.sf.jasperreports.export.xls.exclude.origin.keep.first.report.3=*
Best Open Source Business Intelligence Software Helical Insight is Here
A Business Intelligence Framework
In Case, if you have any queries please get us at support@helicaltech.com
Thanks,
Nisha Sahu
BI Developer
Helical IT Solutions Pvt Ltd