0
votes

I have below code in the Crystal Reports. The report is supposed to show the item description when the description is not null, but when the size is null. The report is not showing anything when the description is not null, but the size is null. The code looks all right, but what am I missing?

if ({Command.size})='None' then {Command.Description}

else if not isnull({Command.Description}) and not isnull ({Command.size}) then {Command.Description}+ ' ' +{Command.size}

else if isnull ({Command.size}) and not isnull ({Command.Description}) then {Command.Description}

else if isnull ({Command.Description}) and not isnull ({Command.size}) then {Command.size}

1

1 Answers

2
votes

Check for nulls first. Otherwise, Crystal would choke on the null objects encountered before.