Using parameters to hide/show subreports or detail bands

I have a report with 3 detail bands, each containing a subreport. It runs fine as is, but I would like to be able to selectively show or hide each of the bands or subreports. I am still very new to iReports, can someone help me please.

sabel's picture
24
Joined: Aug 6 2015 - 11:26am
Last seen: 7 years 1 month ago

Since you're new to iReport, just a warning. iReport is no longer being developed. It is scheduled to be retired at the end of this year.

So, don't use it. Use Jaspersoft Studio.

hozawa - 7 years 9 months ago

I plan to migrate to JSS soon. Unfortunately, I can not be idle and must continue to learn and develop reports until then.

sabel - 7 years 9 months ago

1 Answer:

With ireport or jasper studio you should be able to add parameters at report level with type and default value For example a Boolean printDetail1 and another printDetail2 At the detail band level you will find a property "print when expression" that you can fill with your logical test in your case printDetail1==true and printDetail2==true on your other band
fabricerd's picture
231
Joined: Jun 10 2007 - 7:20pm
Last seen: 5 years 10 months ago
Feedback
randomness