cancel
Showing results for 
Search instead for 
Did you mean: 

Details into a group footer list

Former Member
0 Kudos

Greetings,

I need a way to turn detail lines into a list that I can place into the group footer.

ex.

Group 1 header:

Detail lines:

a

b

c

d

Group 1 footer:

a,b,c,d

I figure I need to create an array, load it then loop thru and unload it... but I don't know the syntax - can anyone help ??

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

fritzfeltus
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello James,

I'm using Crystal Syntax:

You'll need to initialise a string variable in the group header. Create a formula as follows, and place it in the group header.

whileprintingrecords;

stringvar names := "";

Then create a formula which adds the names to the string variable you created. Please it in the details section.

Whileprintingrecords;

stringvar names := names + {Employee.First Name} + ", ";

Now you are ready to display the result in the group footer field. Create a formula which displays the name, and use the left function to trim the the trailing comma and space to make it neat.

whileprintingrecords;

stringvar names := left(names,length(names)-2);

Hope this helps.

Fritz

Former Member
0 Kudos

Perfect! Many thanks

Answers (0)