Error evaluating expression

Hi, please help me

I have an expression like that:

IF($V{TOTFIN3}==0,0,($V{TOTTR3}/$V{TOTFIN3}))

And I have this error:

 

So, If this isdividing by  zero why dont apply the condition.

Help me!!!

 

ajaraq's picture
5
Joined: Apr 12 2017 - 3:22pm
Last seen: 4 years 5 months ago

Please post the expression you're using from the jrxml

darth_fader - 6 years 4 months ago

2 Answers:

This is a Java problem, you must use $V{TOTFIN3}'s methods for comparing value. Something like $V{TOTFIN3}.intValue() =0.

Mariano

mlopez_1's picture
6291
Joined: Oct 21 2013 - 8:08am
Last seen: 2 days 5 hours ago

$V{TOTTR3}/$V{TOTFIN3} is evaluated in expression because it is a function parameter.

Try this expression instead:  $V{TOTFIN3}==0 ? 0 : $V{TOTTR3}/$V{TOTFIN3}

shertage's picture
22370
Joined: Sep 26 2006 - 8:06pm
Last seen: 2 months 3 weeks ago
Feedback
randomness