Reputation: 1621
For example I executed the code on SQL like this.
Fruits--- Taste
Orange -- good
Apple -- Bad
Apple --
Apple --
THEN
I go to Crystal Reports
I made a formula field with HTML TEXT format
{FRUITS}+"<i>"+" "+{TASTE}+"</i>"
Crystal Report is only showing
Orange *good*
Apple *Bad*
Where are these two apples go?
I assume since "TASTE" = NULL therefore, Crystal Reports removed the two apples.
How Can I show it like this on the report?
Orange *good*
Apple *Bad*
Apple
Apple
Upvotes: 1
Views: 1299
Reputation: 7537
If the value of {TASTE}
is NULL
, then the formula "crashes" because NULL
can't be concatenated with a string.
Therefore the formula-field appears empty on the report.
You can fix this by checking for NULL
.
Change the formula like following:
If IsNull({TASTE}) Then
{FRUITS}
Else
{FRUITS}+"<i>"+" "+{TASTE}+"</i>"
Upvotes: 1