For some reason I get a "number is required here message" next to the last if in this statement.
There are basically two transaction types in my data set FX and SE.
If the data is FX and the {transrpt.CCY} = USD I want the field {transrpt.FXNAT2} returned else if the field {transrpt.CCY2}=USD I want the field {transrpt.FXNATURAL} returned. Else if the Transaction type is SE I want the vaule 0 returned
I always seem to get these nested IF's wrong in crystal and am never quite sure why!
Here is the code below:
If ({transrpt.TRANS_TYPE}="FX" and {transrpt.CCY}="USD") then {transrpt.FXNAT2} else if ({transrpt.TRANS_TYPE}="FX" and {transrpt.CCY2}= "USD") then {transrpt.FXNATURAL}
else if {transrpt.TRANS_TYPE}="SE" then "0" else "NA"
Any help would be greatly appreciated!