How to Use Join Function TO display Multiple values of one Field in crystal Reports 2008

7.3k Views Asked by At

I'm trying to Display the Multiple Values of One Database field ("{Customers.Name}"). I was tried to using Join function Like

Join({Customers.Name},","); 
or 
Stringvar array name:={Customers.Name};
for i :=1 to count(name)
(
join(name[i],",");
);![enter image description here][1]

These two codes not woriking because of following one error "String array Requried for Join function" Please Help Me to Solve this

1

There are 1 best solutions below

0
iMet On

It seems {Customers.Name} consist a string, foreach detail section gets values one by by one from XML. If You try to show all names comma separeted, you buld it in detail section, and show it in a group or page footer.

to do this, in group / page header initialize your variable:

Shared StringVar names := "";

in detail:

Shared StringVar names;
names := names & ", " & {Customers.Name};

in group / page footer in a print variable:

Shared StringVar names;
names