Jump to content
We've recently updated our Privacy Statement, available here ×

parametrized removal of a band from a report


stelek

Recommended Posts

Hi,

We have a report which has a band that is optional - the user switches it on and off using an input parameter. The band has defined "print when expression" to evaluate user input. It works properly (the way it was designed) but not exactly the way we would like it to. The problem is that even tough the band is not printed (not visible), the space for the band is still reserved. This results in some empty space in the report and unfortunately, depending on the (dynamic) size of other bands sometimes produces empty pages in the generated PDFs.

Is there any way to shrink the "not printed" bands to zero?

regards

T.S.

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...

Hi,

We have exactly the same issue with the last page footer band. It would be great if a not-printed band doesn't take any place in the resulting jasperprint. Not only the last page footer band but also the details band and all others.

This issue makes the "Print when expression" band property not really usable.

Thanks

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...

I did have some luck with this issue recently but it worked only in this one particular case:

 

I created a band ("title") and put a subreport into it. The subreport was taking the whole band. I then set the "print when expression" for the subreport and enabled "remove when blank" also for the subreport. In this case, when the subreport is not printed, it will also be removed by Jasper and the band that contains the subreport will disappear completely.

 

You might want to try it in your case. It did not solve my original problem though where I do not have a subreport. I really think we desperately need "remove when blank" for a band.

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...