I need to print when either of two expressions is true. I've tested each expression independently, and they work. But when I put them together using ||, only the floatvalue one works. Basically, I need it to print any line that's not the ACA Fee or if the bill amount is not 0. The expression I'm trying to use is:

(!$F{pay_type}.equals("ACA Fee"))||($V{bill_amt}.floatValue() != 0.00)

I've tried adding (), and even made it the if/then statement below.

((!$F{pay_type}.equals("ACA Fee"))||($V{bill_amt}.floatValue() != 0.00)) ? Boolean.TRUE : Boolean.FALSE

If I just use !$F{pay_type}.equals("ACA Fee"), that works just fine.

Any help would be greatly appreciated since I've never been trained on Jasper and I'm learning as I go.

## 1 Answer:

Tried and it worked for me. The only change is that is Java, floating point shouldn't be compared using "==" because of precision.

Try the following:

!$F{pay_type}.equals("ACA Fee")) || $V{bill_amt}.floatValue() > 0.01

or

!$F{pay_type}.equals("ACA Fee")) || $V{bill_amt}.intValue() != 0