Print Page | Close Window

Concatenate Text

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3102
Printed Date: 02 May 2024 at 12:32am


Topic: Concatenate Text
Posted By: ablums
Subject: Concatenate Text
Date Posted: 05 May 2008 at 3:15pm
There is a table in my database that is solely for notes or extra text attached to a record from a different table.  The text references the primary key in the 'header' table and each line of text is defined with a Note_Sequence. 

I would like to list any populated description fields (up to 999 lines) with a comma separator between each field.  I have a vague recollection of a function (Concatenate) that will add a separator automatically, but I have not seen anything of the sort in Crystal.

I know there is probably a common function that will take care of this and I am just missing it... but I do appreciate any help,

-------------
Thanks for the help!



Replies:
Posted By: BrianBischof
Date Posted: 05 May 2008 at 8:26pm
The concatenate function in Crystal is just the '&'. However, to do what you need to do is a bit trickier because all the data is spread across multiple records. I suggest grouping on the primary key and in the Details section add a formula which has  Global string variable that concatenates the field for each record. Then print it in the Group Footer (making sure to enable the Can Grow property).

I cover all Crystal Reports functions and give sample code in my Encyclopedia book. You can find out more about my books at http://www.amazon.com/exec/obidos/ASIN/0974953601/bischofsystem-20 - Amazon.com or reading the http://members.crystalreportsbook.com - Crystal Reports eBooks online.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window