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!

how to convert the multiple row into the single row ?

Status
Not open for further replies.

CrystalReports9

Programmer
Jan 10, 2003
124
US
Current Result
-----------------
<GH> Department 10
<Detail>
Employee ID
------------
12
13 [ Multiple Rows ]
43
54

Required Output:
---------------------
<GH> Department 10
<Detail>
Employee ID
12,13,43,54 [Single Row]
 
Use three formulas:

//{@reset} to be placed in the Department group header:
whileprintingrecords;
stringvar x := "";

//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar x := x + totext({table.employeeID},0,"")+", ";

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

-LB
 
Weldone LB.... Excellent....

Before submit the post, I was finding difficulties with the 'group footer'.

Now your TIPS helps me.... Thank you... Much.
 
At same time in the <Detail Section> the data come like

12,
12,13
12,13,43
12,13,43,54


If i place the formula {@accum} in the <FOOTER SETION> then i am getting only one row 12,13,43,54 .

How to overcome this ?
 
You should suppress the details section and display only the group footer. Use the {@display} formula in the group footer, not {@accum}.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top