|
-
August 14th, 2003, 02:47 PM
#1
Concatenate in Crystal Report
Hello,
How can I concatenate data in a field? Example, I got an output of data that print out on the report as one data per row:
20
25
41
56
and I want it to look like
20, 25, 41, 56
The number of data in the field various.
Thanks.
-
August 14th, 2003, 03:33 PM
#2
Use a loop to go through the number of fields you have. The first time the loop runs, the temporary string will have nothing in it. Every time after, it will concatenante a comma and space, then concatenate the next field. Once the all the fields have been looped through, you will have one string with the values separated by a comma.
Code:
dim intCounter as Integer
dim strTempString as String
For intCounter = 1 to <number of Fields>
If strTempString = "" then
strTempString = Field(intCounter)
Else
strTempString = strTempString & ", " & Field(intCounter)
End If
Next intCounter
Fiona
Last edited by malleyo; August 14th, 2003 at 04:00 PM.
I'd rather be wakeboarding...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|