Jump to content

Is it possible to have an IF statement for displaying iReport summary


kps

Recommended Posts

Hi guys

 

Is it possible to insert an IF statement into a Jasper report to determine which 'summary' band will be displayed, just that we display some details that are dependant on a parameter passed in.

Rather than having 3 seperate reports, I thought it'd be easier if we had an IF statment and depending on  the parameter, one or the other 'summary' band was displayed.

 

Cheers

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 Yes, many ways to do this sort of thing ... Hard to say exactly where you would want this "if" block but a common place for it would be in the band "Print When Expression" ...

Something like this...

If the value was not equal to zero then the section would be hidden... Your question is very open to many different answers. But I hope this helps..

Code:
new Boolean({yourParameter}.intValue() != 0)
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...