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

justaguy picture justaguy · Sep 4, 2015 · Viewed 13.8k times · Source

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 :).

Answer

CoSpringsGuy picture CoSpringsGuy · Sep 5, 2015

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}