I am working on a report with iReport that have many subreports.
I want to have two other sheets in the excel file when generating the report from my application.
When searching the internet I found answers about creating a break in the report, having the option "Ignore pagination " in the subreports "true" , but it is still not clear for me.
What are my options to control how and when a new sheet is created
In jasper report there are different ways to achieve new sheet both in
jrxml
and injava
code. The default behavior is to create a new sheet for every page. I will illustrated the 3 most common ways with relative problem in using them.Method
set
isIgnorePagination="true"
on thejasperReport
tag and addwhen you need a new sheet.
Problem: The report will not be beautiful if you export also to pdf (since its ignoring pagination)
Method To avoid creating new sheet on every new page, set property
And when you want it to create a new sheet before or after an
reportElement
add relative property:Problem: The columns on every sheet will be the same and this can result in ugly colspan on different sheet's
Method
Problem: You can not use this method if you are using jasper report server.