IF, AND, OR Statement


I am trying to to create an expression that compares dates and a string. This expression uses an and, if, and or statement. I am trying to acheive a 1 if the value returns true but always returns a null value when i run it can anyone help? Thanks.


Here's the expression:

IF($F{RFS_GRADE_CODE} == "EE" && $F{STU_ENR_ENTRY_DATE}.before( $P{EffDate} ) && $F{STU_ENR_EXIT_DATE} ==null || $F{STU_ENR_ENTRY_DATE}.before( $P{EffDate}) && $F{STU_ENR_EXIT_DATE}.after( $P{EffDate}) ,"1","0")

fabian.fuentez's picture
Joined: Jan 25 2019 - 1:38pm
Last seen: 3 months 3 weeks ago

1 Answer:



It is not receommended to use '==' with String values. Use $F{RFS_GRADE_CODE}.equals("EE") instead. This is because the == operator only compares object references, while the String.equals() method compares both String's values i.e. the sequence of characters that make up each String

akovach's picture
Joined: Apr 25 2018 - 2:25am
Last seen: 5 days 8 hours ago