|
-
Jul 12th, 2000, 11:52 AM
#1
Thread Starter
Junior Member
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.
Using VB 6.0 SP 3
Bed goes up, bed goes down
-
Jul 12th, 2000, 12:42 PM
#2
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.
"It's cold gin time again ..."
Check out my website here.
-
Jul 12th, 2000, 12:48 PM
#3
Hyperactive Member
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.
-
Jul 12th, 2000, 12:52 PM
#4
Thread Starter
Junior Member
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?
Using VB 6.0 SP 3
Bed goes up, bed goes down
-
Jul 12th, 2000, 01:31 PM
#5
Frenzied Member
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.
Harry.
"From one thing, know ten thousand things."
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
|