If field value null Then "N/A" in crystal report

15,919

Create a new formula... Use that code but make sure and place {} around your field in the else portion and place it in the details section or where ever you want the output of {str1.strmname} to be seen on the report.

If isNull({str1.strmname}) THEN
  "N/A"
else
{str1.strmname}
Share:
15,919
justaguy
Author by

justaguy

I am a scientist learning programming and more efficient was to handle large data sets. I tend to make mistakes so please be patient, I don't mean to upset or frustrate. Thank you :).

Updated on June 26, 2022

Comments

  • justaguy
    justaguy almost 2 years

    I have created multiple reports in crystal reports 2008 but can not figure out how to use a conditional statement in the report. The conditional statement is If a field in the report is null, THEN "NA"

    Would something like the below in the Format Editor... common tab... suppress section formula work

    If isNull({str1.strmname}) THEN
      "N/A"
    else
    str1.strmname
    

    Thank you :).