itpragmatic Posted September 23, 2010 Share Posted September 23, 2010 Experts,In my report I am displaying a unit called work units. Right now this column is displayed as followsWork Units0or Work Units1or Work Units2When Work Units > 1 i want to add a "s" to indicate its plural form. Do i need to put condition clause? $F{units.processedUnits}.valueof( "" ) ? "" : $F{units.processedUnits}+(s)+ someting like that? How should I achieve this? Please suggest or advise. Thank you. Link to comment Share on other sites More sharing options...
itpragmatic Posted September 24, 2010 Author Share Posted September 24, 2010 Any suggestions experts? Do i need to change my query for this? Link to comment Share on other sites More sharing options...
itpragmatic Posted September 27, 2010 Author Share Posted September 27, 2010 Issue resolved with help of conditional operator. One has to pay attention towards opening and closing parentheses. :)conditionMain ? trueValue:(condition2 ? : trueValue: trueValue3)Post Edited by itpragmatic at 09/27/2010 13:05 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