markos17 Posted August 11, 2009 Share Posted August 11, 2009 How can I replace boolean values, so in report it would be Yes/No instead of True/False? Link to comment Share on other sites More sharing options...
svenn Posted August 11, 2009 Share Posted August 11, 2009 ( your boolen field == Boolean.TRUE ? "Yes":"No") Link to comment Share on other sites More sharing options...
markos17 Posted August 12, 2009 Author Share Posted August 12, 2009 Thanks for reply. Anyway, I still have problems with that. I've tried to use Your syntax in report, eg.$F{(Field_1 == Boolean.TRUE ? "Yes":"No")} or in SQL:SELECT xyzFROM XYZ .abcWHEREField_1 == Boolean.TRUE ? "Yes":"No" and still get errors messages. Where should I set this syntax?Post Edited by markos17 at 08/12/2009 13:37 Link to comment Share on other sites More sharing options...
svenn Posted August 12, 2009 Share Posted August 12, 2009 You use that syntax in the textfield element not in your SQL. Link to comment Share on other sites More sharing options...
markos17 Posted August 13, 2009 Author Share Posted August 13, 2009 I am giving up :) all the time I get message: "Cannot cast from String to Boolean".The thing is, that Boolean class is set in my_field: ($F{my_field}==Boolean.TRUE?"Yes":"No")I also tried to use variable, all the time the same error. EDIT:Problem solved. I had to change class of the field in report into String. Post Edited by markos17 at 08/13/2009 12:02 Link to comment Share on other sites More sharing options...
dineshsankaran90 Posted March 28, 2017 Share Posted March 28, 2017 Try this:( your boolen field == true ? "Yes":"No")eg: $P{Expired_ID}==true? "Yes":"No" 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