Jump to content
Changes to the Jaspersoft community edition download ×

It then else in expression


2004 IR Help

Recommended Posts

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...