IF THEN ELSE IF THEN ELSE IF THEN ELSE statements

Hello,

I am trying to formulate following formula in CR 2008:

if {A}=“0” then “No Rx Benefit”
else if {B}=“P” then “MD Updates”
else if {C}>0 then “Claims”
else “”

This formula only works for MD Updates and and Else with empty string. Some reason it never displays Claims. Please let me know if anything going on with my sysntax in CR. I am using Crystal Syntax.

Thanks in advance.


bhagatna (BOB member since 2007-02-26)

Can {A} or {B} be null? If so, then the formula is never getting to {C} because comparing anything to null results in null, not true or false. I would change your formula to something like this:

if (not IsNull({A} and {A}=“0”) then “No Rx Benefit”
else if (not IsNull({B}) and {B}=“P”) then “MD Updates”
else if {C}>0 then “Claims”
else “”

-Dell


hilfy :us: (BOB member since 2007-04-16)

Thanks Dell. I will try this and let you know.

Nandu


bhagatna (BOB member since 2007-02-26)