daniel.mohorovic Posted March 18, 2016 Share Posted March 18, 2016 hi guys,i've two subreports printing in the summary of the main report. when there's no data in the subreports i'd like them be collapsed. in order to do that i've set When No Data Type to No Pages in the subreports and i've set Remove Line When Blank to true to both subreports in the main report.unfortunately it's not working. the subreports are taking all the space even if they're empty. i've tried to delete the subreports to see if they're the cause and that's it. awaiting your help! Link to comment Share on other sites More sharing options...
daniel.mohorovic Posted March 21, 2016 Author Share Posted March 21, 2016 hi guys! just a hint after the we? :) Link to comment Share on other sites More sharing options...
lucianc Posted March 21, 2016 Share Posted March 21, 2016 What vesion are you using? Removing the space seems to work fine for me. A (self contained) test case would of course help. Link to comment Share on other sites More sharing options...
daniel.mohorovic Posted March 21, 2016 Author Share Posted March 21, 2016 hi lucianc! thanks for your answer... i'm using 6.2.0.what do you mean by "A (self contained) test case"? Link to comment Share on other sites More sharing options...
kkriplani Posted March 21, 2016 Share Posted March 21, 2016 Hi, Have you tried a print when condition such that the sub-report doesn't get printed if the report count is null? If not, give it a try for respective subreports in the main report.Regards,KKriplani Link to comment Share on other sites More sharing options...
daniel.mohorovic Posted March 21, 2016 Author Share Posted March 21, 2016 hi KKriplani... thanks for your suggestion! i've already tried but i wasn't able to get it working! if you suggest is the right way to do that, i'll re-try... will let you know! Link to comment Share on other sites More sharing options...
daniel.mohorovic Posted March 21, 2016 Author Share Posted March 21, 2016 KKriplani, lucianc,seems it's not the subreports... following KKriplani's suggesion i've tried ot use the REPORT_COUNT to do it and i've found out the following.exists_clause and exists_discount_surcharge are the main report variables coming from the subreport's REPORT_COUNTs. i've placed them in order to debug:previewing it, the first page is taking a lot of space after the detail:but i see it's not due to the subreports... they're not printed when REPORT_COUNT is equal to 0. everything after detail goes to the second page: any idea why there's so much space after detail? Link to comment Share on other sites More sharing options...
lucianc Posted March 21, 2016 Share Posted March 21, 2016 A self contained test case means a set of jrxmls (and a static data source if required) that can be used to reproduce the problem on a different machine. Link to comment Share on other sites More sharing options...
daniel.mohorovic Posted March 21, 2016 Author Share Posted March 21, 2016 just to be complete... here's how it looks like when the subreports are returning something! Link to comment Share on other sites More sharing options...
daniel.mohorovic Posted March 22, 2016 Author Share Posted March 22, 2016 here are all ther jrxmls to build the report:https://dl.dropboxusercontent.com/u/49472099/jrxmls.zipyou can run with One Empty Record datasource and you'll see the following:page 1page 2 Link to comment Share on other sites More sharing options...
daniel.mohorovic Posted March 22, 2016 Author Share Posted March 22, 2016 hi lucianc, here are all ther jrxmls to build the report: https://dl.dropboxusercontent.com/u/49472099/jrxmls.zip you can run them with One Empty Record datasource and you'll see the following: page 1 http://community-static.jaspersoft.com/sites/default/files/images/22-03-2016%2008-56-31.png page 2 /sites/default/files/images/22-03-2016%2008-56-41(1).png Link to comment Share on other sites More sharing options...
daniel.mohorovic Posted March 22, 2016 Author Share Posted March 22, 2016 moving everything from summary to a new detail 2 band makes it better...but it doesn't sound right... does that make sense to you? Link to comment Share on other sites More sharing options...
mwarner_2 Posted March 22, 2016 Share Posted March 22, 2016 Idea off the top of my head. Haven't tried it.Can you use a Return Parameter, and then use a Print when Return Parameter .equals(null) ? I just tried this, and I had no luck making it work. Sorry. 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