Jump to content
Changes to the Jaspersoft community edition download ×

Help! mathematics on Expressions


Recommended Posts

By: Joseph Wu - thwu

Help! mathematics on Expressions

2002-10-25 02:20

Can Jasper do mathematics on expressions? such as (MaxValue - MinValue)/6*Stdev

 

All Fields are Floating.

 

<textFieldExpression>

$F{MaxValue}-$F{MinValue}/6*$F{Stdev}

</textFieldExpression>

 

The result shows error as below

Incompatible type for -.

Invalid cast from double to java.lang.Float.

 

Can anyone help me, please!

 

 

By: Dejan - dnikolov

RE: Help! mathematics on Expressions

2002-10-26 04:34

what is type of your field???

If is Double attempt this

new Double(($F{MaxValue}.doubleValue()-$F{MinValue}.doubleValue())/(6.0*$F{Stdev}.doubleValue())

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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