Reputation: 65
I have a report that evaluates values and checks if the conditions are correct, if yes it is a success and the report returns Pass
However the equation needs to be modified
Current equation is
($F{SPECPASS}.equals($F{SPECS}) ? "Pass" : "Fail")
I want the new equation to be something like this
If SPECPASS/SPECS >=0.5, then STATUS = ‘Pass’, Otherwise STATUS = ‘Fail’
I am new to Jasper reports and the version we have is 3.6.0
Thank You
Upvotes: 0
Views: 127
Reputation: 2239
I think, we can use
(($F{SPECPASS}.doubleValue() / $F{SPECS}.doubleValue() >=0.5) ?"Pass":"Fail")
Upvotes: 1