2004 IR Help Posted September 2, 2006 Share Posted September 2, 2006 By: Raj - purirb123 It then else in expression 2004-09-16 13:52 Is there any example or hint how to code if then else logic. In my case I have to code some logic like if age of an item is lestt then 3 I should say item LIVE ELSE out of stock. I currently use a backend view with oracle decode function How will I do something simliar with ireport fields. By: Andrew McLaughlin - pik0 RE: It then else in expression 2004-09-16 14:19 Just set the text field type to String and set an expression like this: ( $F{ Age }.doubleValue() < 3 ) ? "LIVE" : "OUT OF STOCK" Where Age is your age column (or a suitable calculation that calcs the years). That should do it... Piko 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