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

Display data in one record

Status
Not open for further replies.
Mar 7, 2010
61
Hi , I am using crystal v11.5 connecting to an oracle database.
I have a style which has many services and 1 proudction order. I want to display one record for each style/production order and somehow concatnate the services, so I can show all the services in one cell against this record. At the moment I am grouping by style, but i can group by production order if needed. Can anyone please help how I achieve this.
Thanks
 
This can be done by using subreport technique, i.e.
In main report - Create group on style or production.
Create a subreport and put services field there.
Link that subreport on your gouped field (style or production.
Format the subreport as desired, and Place that subrport in main report goup footer.
If you like, you can suppress the group header and put the style or production value in report footer just to concatenate with service.
hope that will work.
 
Thanks so much. I have done this. Is there any way I can make the multiple services (that come from the sub report) appear beside each other, rather than under each other? Thanks again
 
You don't necessarily need a subreport. You could instead use variables to concatenate the values to display in a group footer based on production order:

//{@reset} to be placed in the Production Order group header:
whileprintingrecords;
stringvar x;
if not inrepeatedgroupheader then
x := "";

//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar x := x + {table.styleservice}+", ";

//{@display} to be placed in the group footer:
whileprintingrecords;
stringvar x;
if len(x)>2 then
left(x,len(x)-2)

Drag the groupname into the group footer and then suppress the group header and detail section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top