efrizzel Posted April 24, 2015 Share Posted April 24, 2015 I have a field that is classified as a Java.lang.String type but is being used for a true false checkbox item (weird I know) it comes back with 1 for true(checked), 0, and null for false(unchecked)all i would like to do is have the field display a Y or N value instead, but just using the characters Y or N does not seem to work, what else will need to be done? what i have now: if ( <expression> ) ==1 ? Y : N Link to comment Share on other sites More sharing options...
srang Posted April 24, 2015 Share Posted April 24, 2015 You might be able to change the class that iReports casts the field as. I have only used JasperSoft Studio and that feature exists there.EDIT:efrizzel:when you are talking about changing the class that iReports casts the field as how did you go about doing that? is it just selecting the field on the left hand side, and then changing it from whatever it is (java.lang.string i believe) to something else.Yes so if you want to change the field's class you can either change the class where you defined the query by double clicking the class it automatically selects, and then you should see a ... where it will allow you to search for java classes. OR you can select the field on the left hand side and then in the field properties where it shows the class click the ... there and search. Now like I said I've only used jaspersoft studio so some of the layout options may be a little different. If you are completely stumped with how to do it in iReport however, you can pull up the source code and find the field and you will see the class it gets cast to and you can change it there but there is significantly less error checking and if something breaks it can be frustrating to get your report back to a working state. Hope this helps!! Link to comment Share on other sites More sharing options...
efrizzel Posted April 28, 2015 Author Share Posted April 28, 2015 I'm Dumb, all it needs to be is (<expression> ==1) ? "y" : "N" slight formattion change, and then actually using the letters as strings, I guess thats what i get for programming late on a Friday 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