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

One Line Output from Multiple Records 1

Status
Not open for further replies.

ldalessio

Programmer
Apr 16, 2008
23
US
Good Morning All.
I am having brain freeze this morning. I need to read multiple customer records and output a field from each records on one line.

TABLE:
Customer Id
Slot Designation (multiple for each customer)

IE:
John Jones
ADMPRN
John Jones
DEDCT
John Jones
EXTCUR

I need the output to be:
John Jones ADMPRN DEDCT EXTCUR

Can you help an old lady out?
Many Thanks.
 
I'm guessing you have put these two fields in different detail sections? Anyway, first insert a group on {table.customerID} and then create a set of formulas like this.

//{@reset} to be placed in the customer group header and suppressed:
whileprintingrecords;
stringvar slotdes;
if not inrepeatedgroupheader then
slotdes := "";

//{@accum} to be placed in the detail section and suppressed:
whileprintingrecords;
stringvar slotdes := slotdes + {table.slotdesignation} + " ";

//{@display} to be placed in the group footer:
whileprintingrecords;
stringvar slotdes;

Drag the groupname into the group footer, place {@display} next to it, and suppress the group header and detail sections.

-LB
 
Thank You Thank You Thank You.
I had most of the calcs right but just learned a new one.
I wasn't aware of the "inrepeatedgroupheader".

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top