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

Listing Sub Report Data 1

Status
Not open for further replies.

trialbyfire

IS-IT--Management
May 11, 2002
19
US
I have several reports where I have a subreport that returns multiple lines of data from the subreport for one line in the main report.

Ex...

SKU ABC QTY 16 BIN 47 LOT 6 DT 6-9-05
6-10-05
7-2-05
SKU ABD QTY 20 BIN 53 LOT 7 DT 4-22-04
6-28-04

This causes blank lines both in the report and any export to Excel, CSV, etc... I need all of the data that is being returned from the subreport but I would like to see is listed as follows. Can this be done.

Ex...

SKU ABC QTY 16 BIN 47 LOT 6 DT 6-9-05, 6-10-05, 7-2-05
 
In the subreport, create a formula which accumulates the dates into one line per group (grouping on whatever field you want to accumulate the dates for):

//{@reset} to be placed in the group header of the subreport:
whileprintingrecords;
stringvar dates := "";

//{@dateaccum} to be placed in the subreport detail section:
whileprintingrecords;
stringvar dates := dates + totext({table.date},"MM/dd/yyyy") + ", ";

//{@displaydates} to be placed in the subreport group footer:
whileprintingrecords;
stringvar dates;
left(dates,len(dates)-2)

Then suppress all sections except the subreport group footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top