bz3x Posted January 8, 2013 Share Posted January 8, 2013 Dear community,I've been struggling with what seems like a simple issue. I have a report with three subreports. When the first subreport has just enough records in the detail section to fill up almost the entire first page, and at the bottom of the first page there's just enough room for the header of the second subreport (but not the details section), that subreport shows only the column header and the column footer but not the data section.In short: how can I force the second subreport to display the column header and column footer only if the detail section is displayed?I've tried setting the "Print when" of subreport's column footer to !$V{sumTotal}.isNaN() (sumTotal is a variable I use to show data in the footer). That works for the footer but the subreport header remains. And I can't use the same trick as with the footer because the sumTotal variable isn't set yet.The issue is clearer in the attached report.Thanks for any pointers or solutions! Link to comment Share on other sites More sharing options...
bz3x Posted January 9, 2013 Author Share Posted January 9, 2013 Correction: column header and column footer were not the appropriate bands for this report. I'm now using "title" and "last page footer". The main question now is: How to force a page break when there is only space for the title but not for any records, so that the whole subreport starts on a new page? Link to comment Share on other sites More sharing options...
Solution oesina Posted January 9, 2013 Solution Share Posted January 9, 2013 Hi bz3x,try to make the size of your subreport image with something like 200pixel Height, so that will become the minimum size to start the band and the subreport object on the same page. So there's onlly less than 200 pixels on the bottom of the page, it will force to start from next page.Hope it helps,Olga Link to comment Share on other sites More sharing options...
KGZ Posted January 9, 2013 Share Posted January 9, 2013 Hi bz3x,You can use the variable REPORT_COUNT in the "print when" expression like this : !$V{REPORT_COUNT}==0KGZ Link to comment Share on other sites More sharing options...
bz3x Posted January 9, 2013 Author Share Posted January 9, 2013 YES! Thank you Olga. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now