Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Conditionally Display Words Post Reply Post New Topic
Author Message
JFinzel
Groupie
Groupie
Avatar

Joined: 20 Jul 2011
Location: United States
Online Status: Offline
Posts: 49
Quote JFinzel Replybullet Topic: Conditionally Display Words
     Posted: 19 Sep 2011 at 4:35am
I have what I hope is a simple problem:

I want to display (Name) and (Spouse Name), but the "and" I do not want to display if there is no spouse, i.e.:

John Doe


Patrick Smith and Jane Smith


NOT:
John Doe and


Patrick Smith and Jane Smith


So I want to display the "and" only if (Spouse Name) is not blank.  Any ideas?  Thanks.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2011 at 4:52am
Name + (if table.spousename = "" then "" else " and " + table.spousename)
 
set the formula to use "default values for null"
IP IP Logged
JFinzel
Groupie
Groupie
Avatar

Joined: 20 Jul 2011
Location: United States
Online Status: Offline
Posts: 49
Quote JFinzel Replybullet Posted: 19 Sep 2011 at 5:54am
Thank you.  For other reasons I thought that I would not be able to use "" as a condition if there were no data in that field, but this works perfectly!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum