rlowe Posted February 23, 2010 Share Posted February 23, 2010 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 More sharing options...
arunsankarkk Posted February 24, 2010 Share Posted February 24, 2010 to obtaiin that u need to have an attribute which holds this values. Then in ur iReport field go to editExpression and give a ternary condition.I hope this will resolve ur probs.. Link to comment Share on other sites More sharing options...
thygizmo Posted February 24, 2010 Share Posted February 24, 2010 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,GizmoPost Edited by thygizmo at 02/24/2010 12:58 Link to comment Share on other sites More sharing options...
rlowe Posted February 24, 2010 Author Share Posted February 24, 2010 Gizmo thanks very much this worked perfectly..... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now