Field join

Printed From: Crystal Reports Book — Forum Name: Talk with the Author

Hello.  Can anyone help regarding trying to join fields from two separate records?  It's more complicated than just doing a ToText formula, I believe.
 
For example, I can have three records with one parent account number, but with two "child" account numbers.  So, my records initially show like:
 
Parent           Child
123456         111111
123456         222222
123456         333333
 
What I would like to do, though, is on the report, on one line, reflect it like:
 
Parent          Children
123456         111111,222222,333333
 
 
Any help would be appreciated!  Thanks, Mike
The best way to do this is to use a subreport and a shared variable. In the subreport, use a shared variable in a formula that concatenates the Child data into a comma separated string. Hide the subreport so that you don't see all the row data being printed as the formula is calculated. Print this string in the main report after the subreport prints.
Can this be elaborated on? I don't understand how to accomplish this in the correct syntax code.
 
Thanks.