Help! mathematics on Expressions

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.


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())
2001 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:26am
Last seen: 17 years 1 month ago

0 Answers:

No answers yet