Jump to content

subreports not collpasing when empty


daniel.mohorovic

Recommended Posts

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.

 

18-03-201617-12-18.png.63d58165b10f3c2a5d37c80d9f593bf7.png

 

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.

18-03-201617-29-41.png.2c44d83a420cab28bb82d936935214e0.png

 

i've tried to delete the subreports to see if they're the cause and that's it.

 

18-03-201617-27-39.png.81190d50f3ebf4109310565c1e607d38.png

awaiting your help!

 

 

Link to comment
Share on other sites

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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:

21-03-201614-25-05.png.88f3590b50b144af53ecb04b60c2a9bc.png

previewing it, the first page is taking a lot of space after the detail:

21-03-201614-06-26.png.9a8e561c270d920e699d814ac3a9b32c.png

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:

21-03-201614-06-33.png.93c91de9c98f01affeac01a3eadee93e.png

 

any idea why there's so much space after detail?

 

 

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...