ajaraq Posted May 4, 2017 Share Posted May 4, 2017 Hi, please help meI 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!!! Link to comment Share on other sites More sharing options...
darth_fader Posted May 4, 2017 Share Posted May 4, 2017 Please post the expression you're using from the jrxml Link to comment Share on other sites More sharing options...
mlopez_1 Posted May 5, 2017 Share Posted May 5, 2017 This is a Java problem, you must use $V{TOTFIN3}'s methods for comparing value. Something like $V{TOTFIN3}.intValue() =0.Mariano Link to comment Share on other sites More sharing options...
szaharia Posted May 5, 2017 Share Posted May 5, 2017 $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} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now