Talk with the Author
 Crystal Reports Forum : General Information : Talk with the Author
Message Icon Topic: Field join Post Reply Post New Topic
Author Message
mrc161
Newbie
Newbie


Joined: 27 Dec 2007
Location: United States
Online Status: Offline
Posts: 19
Quote mrc161 Replybullet Topic: Field join
    Posted: 12 Aug 2008 at 1:33pm
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
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 12 Aug 2008 at 2:14pm
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.
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>
IP IP Logged
laknight
Newbie
Newbie


Joined: 15 Aug 2008
Location: United States
Online Status: Offline
Posts: 9
Quote laknight Replybullet Posted: 21 Aug 2008 at 10:58am
Can this be elaborated on? I don't understand how to accomplish this in the correct syntax code.
 
Thanks.
laknight
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.000 seconds.