Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR 9 IF ELSE does not do the else 1

Status
Not open for further replies.

taterday

Programmer
Jan 28, 2009
183
US
Using crystal syntax
I can not get the else to work. This is a label. I have a formula with this code:

if trim({fieldname}) <> "" then
use these two fields to create the label
else
use two other fields to create the label

When the logical IF fieldname is true the IF has the data requested.
if fieldname is false the else comes out as blank. The field does not have anything in the label.

Please help.
 
Its probably because that Field is actually null try

Also you must deal with nulls first

if isnull(fieldname) or trim({fieldname}) = "" then
use two other fields to create the label
else
use these two other fields to create the label

Ian
 
You were right!

Thank you,

You earned your star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top