Jump to content
We've recently updated our Privacy Statement, available here ×

operator - cannot be applied to java...


2004 IR Help

Recommended Posts

By: Adrian din - nida0

operator - cannot be applied to java...

2004-02-06 01:38

I am trying to calculate the difference of 2 columns:

variabile type is double (as the comuns are)

Expresion:

$F{val_mon} - $F{val_mon_inc}

....

When running the report I get this error:

 

operator - cannot be applied to java.lang.double, java.lang.double:

value = (java.lang.Double)(((java.lang.Double)field_val_mon.getValue()) - ((java.lang.Double)field_val_mon_inc.getValue()));

 

 

I do not know what is the problem : everything is DOUBLE - why can't HE operate the difference ?

 

Thank You,

Adrian Din

 

 

 

 

 

By: Adrian din - nida0

RE: operator - cannot be applied to java...

2004-02-06 04:06

Found it:

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