Reputation: 2118
I want print section approximately half page size on bottom of every page only when boolean property (eg printFooter) is set to true. Assume I have in detail band 1 row element and printing thousands records.
I tried multiple ways to achive this as page footer, column footer ... bat problem is if i use "Print when expression" that band doesn't print but still occupied a space, another approach have footer on minimal size and use "stretch with owerflow" doesn't work either, as same as subreport and "Print when detail owerflows".
Now i have only two choices, one to create 2 reports and other to modify xml via java, but still i don't like this.
Maybe i miss something, so I'm asking if is there some solution?
Edit 150313-0723 Nobody have and Idea? Best solution yet for me is to create 1 "main" report as packaging an others 2 as optional parts.
Upvotes: 4
Views: 4419
Reputation: 2118
My solution finally was to use 2 subreports. One of them have a pageFooter another one haven't. In main report i have in detail section code to add record ($F{_THIS}) to List parameter (another way is put to report data as parameter) and in summary band I have this subrepors with print expression, one if parameter is true another one if parameter is false (Subreport data is as: new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{SubreportData}))
Upvotes: 1