Hi all,
I'm trying to show a subreport at the end of my report which should
- start a new page
- grow to use as much space as it requires
- use the same datasource as the parent report
But so far I have been unable to get it to show up.
I have tried putting the subreport into the Summary section as well as the Last Page Footer. Also I have tried using the connection or the datasource from the parent report. I have tried toggling "Run To Bottom" and played around with the "Stretch Type" of the subreport element - all to no avail.
What _did_ turn out to be a good idea was to compile the subreport into a JasperReport object and set it as a report parameter to avoid classpath problems. So I'm sure that the subreport is valid and can be evaluated on its own.
If I can't get it to work I'm prepared to render the reports separately, export them to PDF and concatenate them via iText but first I'd like to try getting it to work "the right way".
1 Answer:
Managed to get it working after all.
What I finally did was:
- provide a copy of the datasource via a parameter in the parent report instead of trying to use the same datasource
- check "Title on a new page" in the subreport
Keeping the growing subreport in the Summary band of the parent wasn't problematic after all.