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!

Concatenate Multiple Rows 1

Status
Not open for further replies.

kcoleman26

Technical User
Oct 26, 2007
66
0
0
US
Crystal 2008
I have a report grouped by ID# some ID's have 1 contract some ID's have multiple contracts.

I want a single field display of all of the contracts for the ID#.

Example:
ID 1
Contract #1

ID 2
Contract #1
Contract #2
Contract #3

ID 3
Contract #1
Contract #2

What I want it to display like this in the Group/Header or Footer:
(2 Columns)
ID# CONTRACT#'s
ID 1 Contract#1
ID 2 Contract#1, Contract#2, Contract#3
ID 3 Contract#1, Contract#2

Thanks,
KC



 
Hello KC,

You can display it on the group footer, you'll need three formulas:

//place in groupheader section
@ResetVar
whileprintingrecords;
stringvar vcontractlist := ''

//place in detail section
@ContractsList
whileprintinrecords;
stringvar vcontractlist := vcontractlist + table.contractID + ', '

//place in group footer section
@DispList
whileprintingrecords;
stringvar vcontractlist;
left(vcontractlist, len(vcontractlist) - 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top