Problem with blank rows when excluding bands and exporting to PDF.

I would like to create reports that can be exported as xls or pdf and have different layouts depending on which export type is chosen. I’m trying to accomplish this by excluding certain groups/bands based on export type, and this works fine for removing pdf bands from the xls output.

There would be an empty row wherever a band was excluded, but I can use <property name="" value="true"/> to remove these empty rows.

There does not appear to be a pdf equivalent to this property, so when I export to pdf and exclude the xls groups I am left with empty space wherever the xls bands would have been.

I tried using “Remove Line When Blank” for every item in the row, and I’ve tried putting every item in a frame and using ”Remove Line When Blank” on the frame. I’ve also tried excluding by key instead of by band, but none of these methods worked.

Does anyone know how to make sure that bands excluded when exporting to pdf do not leave blank space behind in the final output of the report?

ggeeslin's picture
Joined: Sep 18 2015 - 10:20am
Last seen: 5 years 9 months ago

I think this is a known issue. Even i tried many ways, but there is no work around as far as i know.

reportdev - 6 years 3 months ago

1 Answer:

I just create a custom parameter for export type and use that in print when evaluation. This works OK for me because I'm using my custom application to generate web pages instead of JasperReports Server.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago