Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strip unwanted commas from text object if value is null

Status
Not open for further replies.

mpunhani

MIS
May 14, 2004
2
US
I am new to Crystal Reports. I am using version 8 against DB2 database. I have a text object that displays 3 different fields from the database. The values are seperated by commas.
field1, filed2, filed3
If the values are null I do not want to display hanging commas. Is there a formula I can use to not display the comma if the next field value is null?
 
In the text box, place the following:

{field1} {@formula1} {field2} {@formula2} {field3}

...where {@formula1} is:

if not isnull({field2}) then ", " else ""

...and {@formula2} is:

if not isnull({field3}) then ", " else ""

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top