Jump to content
Changes to the Jaspersoft community edition download ×

variable expression arithmetic format


2005 IR Help

Recommended Posts

By: dex wintergreen - wpmadden

variable expression arithmetic format

2005-11-04 11:40

I have a Double field from my datasource

 

I want to create a Double variable

foo = $F{value} / 10

 

what is the canonical way to do arithemetic in the

"Variable expression" field of the "Add/modify variable"

dialog in iReport?

 

I tried

 

$F{value} / 10

 

and many other combinations of casting and

parenthesis to no avail

 

please help!

 

thanks, dex

 

 

 

 

 

 

By: dex wintergreen - wpmadden

RE: variable expression arithmetic format

2005-11-04 11:55

 

new Double($F{value}.doubleValue() / 10)

 

does the trick

 

ah, the joys of java.lang.Number

 

 

 

 

By: PhreddNet - phreddnet

RE: variable expression arithmetic format

2005-11-04 11:55

new Double($F{value}.doubleValue() / 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...