-
I am totaly new at using Crystal Report, so far I have been able to do some of the basics. If it is possible, I need to know how to put all of the selected data from one field into the field separated by a comma. like this , "data1, data2, data3,..."
hope this makes sense.
-
I think I know what you want; if not, please re-post and clarify. Does the following example apply to your problem? Let's say there are two fields in the recordset that is being input to your report: FirstName and LastName. On the report detail line, instead of these two separate fields, you want one field: LastName, FirstName. To do this, in Crystal Reports, you would do Insert -> Formula. The "New Formula" window comes up, you name it, then the "Edit Formula" window comes up. For "Formula text" you would type something like this:
TrimRight({MyRecSet.LastName})+", "+TrimRight({MyRecSet.FirstName})
Then hit the Check button, then if all is well, hit the Accept button. You would then use this formula field instead of the two separate fields on your detail line.
-
In your query string if (you're using one) concatenate your fields.
SELECT data1 & ', ' data2 & ', '" & data3 as Field1 FROM table1
then you'll have one field called Field1 in your report
Or
In your report create a formula that concatenates the fields.
-
That's sort of it
BruceG, thanks for replying
Instead of combinning two different fields, I want to combine all the data from the recordset into one field. So if my recordset has only first names in it, I want to display all of the first names at once.
ex. "firstname1, firstname2, firstname3,..."
Does this make sense?
-
Maybe you could just export your database to a comma-delimited text file and parse it as a plain text file.
I think fields are delimited by commas and records are delimited by newlines. I think.