I'm trying to print parts of a jasper report conditionally by comparing the parameter supplied value to the value in the field.
However, when I do the comparison the outcome is always FALSE
.
Both the field and the parameter are INTEGERS
. If I compare either of them to an actual number that exists in the dataset, then the outcome is true
. Yet, when I supply that same existing number through the parameter for comparison with the field, the outcome is false.
My logic looks like this,
($F{EMPNO}==$P{eno})? "Hello":"Invalid."
Ideally, I expect the word 'Hello' to be printed when the value supplied through the parameter makes the condition true, and 'Invalid' to be printed when the condition is false.