Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I hope this can be done in Crystal Reports for Visual Studio 2008.
Given the following data being sent to Crystal....
ID Val
1 A
1 C
1 F
2 C
2 B

...can it be displayed as follows?
ID Val
1 A, C, F
2 C, B
Thanks in advance.
Posted
Updated 15-Aug-10 22:23pm
v2

Yes, it can be done.

Option 1:
At QUERY level: Make a query that returns the data as you showed here

Option 2:
At REPORT level: Do a grouping by ID in your report.

Try!
 
Share this answer
 
I have searched and tried this formula but it did not work correctly

Group Header section)
shared stringvar b;
b := '';

(Detail section)
whileprintingrecords;
shared stringvar b;
if not IsNull({DaySheetReport;1.Code}) then
(
if (b = '') then
b := b + {DaySheetReport;1.Code}
else
b := b + ', ' + {DaySheetReport;1.Code}
)


(Group Footer section)
shared stringvar b;
b

it shows the data like this

1 A
1 A,C
1 A,C,F
2 C
2 C,B

What is the problem with the code?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900