Jump to content
JasperReports Library 7.0 is now available ×

Help needed to set up en expression


2004 IR Help

Recommended Posts

By: Raj - purirb123

Help needed to set up en expression

2004-09-28 13:11

I have following expression all I want to do is if life status equal Alive I want to return 3 else 10. Expression is double type. I get inconvertible error. Life status is a query field of type varchar2 in Oracle

 

($F{LIFE_STATUS}.equals("Alive"))?3:10

 

I also tried:

 

($F{LIFE_STATUS}== "Alive")?3:10

 

That also gave me error.

 

Thanks

 

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: Help needed to set up en expression

2004-09-28 13:19

Expressions must evaluate to an object, not a primitive. You need to make it:

 

$F{LIFE_STATUS}.equals("Alive") ? new Double(3) : new Double(10)

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...