I'd like to ask about comparing between field values in iReport, here is the code: $V{variable2}=($F{value1}==$F{value2})? "100":"0"
.
I don't know what happened but that code doesn't work as it's expected.
Please help, thanks in advance.
expressionireportjasper-reports
I'd like to ask about comparing between field values in iReport, here is the code: $V{variable2}=($F{value1}==$F{value2})? "100":"0"
.
I don't know what happened but that code doesn't work as it's expected.
Please help, thanks in advance.
Best Answer
If $V{variable2} expression is
And that doesnt work you may need to try to compare the primitive values or the object oriented equals() method that Alex K mentioned. Assuming the fields are integers.