[crystal-reports] Formula to check if string is empty in Crystal Reports

I have written a formula to return a string based on logic run on a string field in my database. I have everything working, except I'm unable to return when the field is the empty string.

This is what I need:

...
else if ({TABLE.FIELD} = "") then
    "Fixed"
...

However, this entry appears as the empty string in my report. I've tried testing the length of the field to 0 and the StrCmp functions. Nothing seems to work. Google results state that a simple comparison to "" or '' should make the logic work. I am new to CR, so maybe I am missing something. Any ideas on how I can acquire this functionality?

This question is related to crystal-reports

The answer is


If IsNull({TABLE.FIELD1}) then "NULL" +',' + {TABLE.FIELD2} else {TABLE.FIELD1} + ', ' + {TABLE.FIELD2}

Here I put NULL as string to display the string value NULL in place of the null value in the data field. Hope you understand.


On the formula menu just Select "Default Values for Nulls" then just add all the fields like the below:

{@Table.Field1} + {@Table.Field2} + {@Table.Field3} + {@Table.Field4} + {@Table.Field5}

if {le_gur_bond.gur1}="" or IsNull({le_gur_bond.gur1})   Then
    ""
else 
 "and " + {le_gur_bond.gur2} + " of "+ {le_gur_bond.grr_2_address2}