Hi
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
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?
thanks
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
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?
thanks