Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question reg. formulas 1

Status
Not open for further replies.

cestonina

Programmer
May 25, 2003
30
0
0
SG
Hi,

Currently I have created two groups (Date and Names) in Crystal Reports. My reports look like the ones below:

10/24/2004
John Doe
Lisa Marie
John Preston
etc.
10/25/2004
Erwin Days
Selvis Richmond
Welwin Darrack
etc.

I would like to achieve the above with the following,

10/24/2004
John Doe, Lisa Marie, John Preston, etc.
10/25/2004
Erwin Days, Selvis Richmond, Welwin Darrack, etc.

This way I can save huge amount of space in each page. Any ideas how I can achieve this via formula? I tried to use Multi-column in details pane properties but apparently it would affect the alignment of the first group as well.

Appreciate any help and thanks in advance.

Regards,
Chris
 
The version of Crystal is important here, as with most questions.

Group by the date, and then use the 3 formula method:

GH1 formula
whileprintingrecords;
stringvar Names:=""

Details
whileprintingrecords;
stringvar Names:=Names+{table.name}

GF1 formula (display at the group footer)
whileprintingrecords;
stringvar Names

You may run out of room as the max output for formulas in CR 8.5 and below is 254

-k
 
To include commas, change SV's detail formula to:

whileprintingrecords;
stringvar Names:=Names+{table.name}+", ";

Change the display formula to:
whileprintingrecords;
stringvar Names;
left(Names,len(Names)-2);

-LB
 
Thanks guys. Will try this out.

Cheers,
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top