I am attempting to create reports that can be exported in either PDF or in XLS/XLSX. These reports need to have a different layout depending on the export type. I am trying to accomplish this by creating multiple groups, and using properties to exclude specific group bands based on export type.
Excluding these bands works as expected when the export type is XLS or XLSX, but when the export type is PDF a blank row is left behind where the band I excluded would have appeared.
Here is an example of the properties I'm using:
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.group.1" value="Customer-PDF"/>
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="groupHeader"/>
<property name="net.sf.jasperreports.export.pdf.exclude.origin.group.2" value="Customer-XLS"/>
<property name="net.sf.jasperreports.export.pdf.exclude.origin.band.2" value="groupHeader"/>
I have attached an example .jrxml file that uses the Sample DB to illustrate the issue. I've also attached example output.