R – Else part never getting executed in crystal report formula field

crystal-reports

I have a simple formula in crystal syntax which looks something like this :

if isdate(totext({Absence Details.Return to Work Interview Date})) = true
  and {Absence Details.Return to Work Interview required} = true then
    1
else
    0;

This is the actual code of the formula

but the else part is never getting executed, when the condition is not true report just shows blank. I am not sure what I am doing wrong here.

Thanks in Advance.
– Amit

Best Answer

Maybe you have some null value in your fields - in such case crystal just returns null. You then need either "convert null values to default" setting for report or explicit testing against nulls.

Related Topic