Products A-Z All Services Can't find what you're looking for? Chat Live!
Products A-Z Can't find what you're looking for? Chat Live!
Can't find what you're looking for? Chat Live!
I'm trying to add a formula into my crystal report - For the first names I want to join husband and wife with & if both exist. Below is my formula:
if {CnSpSpBio.CnSpSpBio_First_Name} > " " then {CnBio.CnBio_First_Name} + " & " + {CnSpSpBio.CnSpSpBio_First_Name} else if {CnSpSpBio.CnSpSpBio_First_Name}= " " then {CnBio.CnBio_First_Name}
What's happening is that if the record doesn't have a spouse name at all the record is not appearing in preview.
Is there another place I need to set something so that it accepts the record whether it has spouse first name or not?
Thank you.
If a field can be Null, then the first thing that you need to do is test whether it is Null. If you don't do this, then the formula will simply return Null whenever the field is Null.
Drew
Another minor point. Since the {CnBio.CnBio_First_Name} is constant, there is no reason to include it inside the IF...THEN statement. You could rewrite this formula as{CnBio.CnBio_First_Name} + IF IsNull({CnSpSpBio.CnSpSpBio_First_Name}) THEN " & " + {CnSpSpBio.CnSpSpBio_First_Name} ELSE ""
Any suggestions on how I can get it to work - or do I simply need to put both first names in separate fields?