Print Page | Close Window

COALESCE or Crystal equivalent

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7088
Printed Date: 30 Apr 2024 at 3:21am


Topic: COALESCE or Crystal equivalent
Posted By: Pinto
Subject: COALESCE or Crystal equivalent
Date Posted: 20 Jul 2009 at 6:30am
I have the following formula, but if any of the fields are null then nothing is displayed. I tried using Coalesce, but got a formula error. Can you use Coalesce in crystal or do I need to do it another way ?
 
{tblLEG_Civil.Civ_Title} + ' ' + {tblLEG_Civil.Civ_Firstnames}+' ' +{tblLEG_Civil.Civ_Surname}



Replies:
Posted By: DBlank
Date Posted: 20 Jul 2009 at 7:34am
There is probably a more elegant solution but this will work.
(if isnull({tblLEG_Civil.Civ_Title}) then '' else {tblLEG_Civil.Civ_Title} + ' ') +
(if isnull({tblLEG_Civil.Civ_Firstnames}) then '' else {tblLEG_Civil.Civ_Firstnames} + ' ') +
(if isnull({tblLEG_Civil.Civ_Surname}) then '' else {tblLEG_Civil.Civ_Surname})


Posted By: Pinto
Date Posted: 21 Jul 2009 at 1:12am
Thanks - that works fine Big%20smile



Print Page | Close Window