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

how to perform a conditonal statement


rlowe

Recommended Posts

I am new to ireporter and have and SQL query that returns a boolean field called did_run where 0=false or 1=true. I would like to know how to have the report display the character string "New" when the value is false and blank "" when the value is true.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Exactlty, just to complement the previous reply:

1) Just edit the column field on your report (choose the "Edit expression" option), that you would like to print.

2) write something like:

$F{field}.equals(new String("0")) ? "New" : ""

 

And the field will be converted at "Printing" time, from 0/1 to "New"/""

Cheers,

Gizmo



Post Edited by thygizmo at 02/24/2010 12:58
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...