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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Records on 1 line 1

Status
Not open for further replies.

mmemon

Programmer
Nov 21, 2002
46
US
Good Morning,

I have a report which displays sales reps and their title on each individual line. Ex:

Project Specialist: Donald Duck
Project Specialist: Mickey Mouse
Project Specialist: Scooby Doo
Customer Service Rep: Bugs Bunny
Customer Service Rep: Elmer Fudd

I need to display on 1 line for each title: Ex:

Project Specialist: Donald Duck, Mickey Mouse, Scoob Doo
Customer Service Rep: Bugs Bunny,Elmer Fudd

I thought about writing a loop to accomplish this but I wasn't sure if there was a better solution in Crystal.

Any suggestions would be appreciated. Thank You

Michele
 
Group by the Title, and create 3 formulas:

Group header formula (suppressed)
whileprintingrecords;
global stringvar TheNames:="";

Details formula (suppress
whileprintingrecords;
global stringvar TheNames;
TheNames := TheNames+{table.name} +", "

Group footer formula (this is where you'll display them)
whileprintingrecords;
global stringvar TheNames;
TheNames

In the group footer place the title field with this formula afterwards.

In CR 8.5 or below you're limited to a max of 254 chars.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top