ajith.devendra Posted December 30, 2018 Share Posted December 30, 2018 Dear Team, i have a below simple if statement in expression , but it returns null .. Would you pls help me to resolve this . IF($F{TRANSPORTMODE} == "8","FreeZone",IF(($F{TRANSPORTMODE} == "7"),"CARGO TERMINAL","")) rgdsA Link to comment Share on other sites More sharing options...
andycolman Posted December 31, 2018 Share Posted December 31, 2018 Hi,I think I have tried this before and had a similar problem. Jasper doesn't seem to cope with nested IF's.I'm just trying to find the report I had the issue in and how I worked around it. Link to comment Share on other sites More sharing options...
andycolman Posted December 31, 2018 Share Posted December 31, 2018 Actually, this does work. Drop the quotes around your numbers and make sure the data type of the field is set to 'Integer' ..IF($F{TRANSPORTMODE} == 8,"FreeZone",IF(($F{TRANSPORTMODE} == 7),"CARGO TERMINAL","")) Link to comment Share on other sites More sharing options...
ajith.devendra Posted January 2, 2019 Author Share Posted January 2, 2019 Dear Andy,Thanks for your advice .. I managed to get it worked with below expression $F{TRANSPORTMODE}.equals("8")?" FreeZone":$F{TRANSPORTMODE}.equals("7")?"CARGO TERMINAL":""and copied the expression in to the "initial value expression" as well .rgdsAjith 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