railey.shah Posted March 11, 2013 Share Posted March 11, 2013 Good Day All,can anybody help me on this. I try to make an if else expression ($F{OUT_STATUS} .equals("40") ? "Applied": "Failed" ). Main main pioint is if the Out_status data is 40 it will show Applied and other than that are failed. however when i run my report it just show Failed for all data. Note that the Out_status datatype is int and i also have try to chage it to ($F{OUT_STATUS} .equals(40) ? "Applied": "Failed" ) but the result are same. Its my first time using jasper. Before this im a crystal developer. Thank You Best Regards Link to comment Share on other sites More sharing options...
C-Box Posted March 11, 2013 Share Posted March 11, 2013 If your field is type of Integer you should use an Integer expression instead:$F{OUT_STATUS}.intValue() == 40?"Applied":"Failed" Be sure that your field is not null, otherwise use this:$F{OUT_STATUS} == null || $F{OUT_STATUS}.intValue() != 40?"Failed":"Applied" hth + regards from GermanyC-Box Link to comment Share on other sites More sharing options...
railey.shah Posted March 12, 2013 Author Share Posted March 12, 2013 Thank You sir, It really help me. Link to comment Share on other sites More sharing options...
rosamarozzi Posted December 9, 2015 Share Posted December 9, 2015 Good evening! What aboot if the field from the database is a boolean? Thank you Link to comment Share on other sites More sharing options...
C-Box Posted December 10, 2015 Share Posted December 10, 2015 Boolean.TRUE.equals($F{YourBoolField}) ?"Write Static YES as its just true": "Write Static NO as its null or false" hth C-Box 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