I have an RPT file that is using the three formula "trick" to concatenate a list of items into a comma separated list.
Example Dataset:
Number | Letter |
---|---|
1 | A |
1 | B |
1 | C |
2 | A |
3 | A |
3 | B |
Should be turned into:
Number | Letter |
---|---|
1 | A, B, C |
2 | A |
3 | A, B |
However, under certain circumstances the out out looks like this:
Number | Letter |
---|---|
1 | A, B |
2 | A, B |
3 | A, B |
I have narrowed this down to occurring when all of the following are true:
- Exporting Report to Microsoft Excel (97-2003)
- The length of two consecutive Concatenations are each over 255 characters
The formulas I am using to do the concatenation are as follows:
@Reset (placed in the Group Header #1, suppressed):
WhilePrintingRecords;
StringVar AllLetters := ' ';
@Concat (placed in the Details, suppressed):
WhilePrintingRecords;
StringVar AllLetters;
if AllLetters = ' ' then
AllLetters := {Command.Letter}
else
AllLetters := AllLetters + ', ' + {Command.Letter}
@Display (placed in the Group Footer #1, suppressed):
WhilePrintingRecords;
StringVar AllLetters;
Does anyone have an idea what's going on? Is this a bug with the Crystal Reports export function? Any help is appreciated.