I found over the net this interesting formula that explain how to append a list of string details into just one line like
ItemA, ItemB, ItemC
Here's the original text:
The solutions requires three formulas, and assumes that the items are within an existing group on the report:
1) In the Group Header place the @reset formula:
WhilePrintingRecords;
StringVar chain := '';
NumberVar ChCnt := 1
2) On the Details place the @Accum formula, putting your field into the second line:
WhilePrintingRecords;
StringVar Item:= {Your.Field}; // place your field in place of {Your.Field}
StringVar Chain;
NumberVar ChCnt;
if ChCnt = 1
then (ChCnt:= 2; chain := Item)
else
if Length(Chain) + Length(Item) > 254
then Chain := Chain else
chain := chain + ', ' + Item
3) On the Group Footer place the @Display formula:
WhilePrintingRecords;
StringVar Chain
**Important Note. A formula result (string) cannot be more than 254 characters. If your items add up to over 254 characters, this formula will not print them all. It will only print the first 254 characters. You could create a second parallell set of formulas that picks up where this one leaves off.
------------------
BTW, how can I obtain a list of "unique" value, for example a list of customers that have bought multiple items?
Thanks in advance,
Fedleo
ItemA, ItemB, ItemC
Here's the original text:
The solutions requires three formulas, and assumes that the items are within an existing group on the report:
1) In the Group Header place the @reset formula:
WhilePrintingRecords;
StringVar chain := '';
NumberVar ChCnt := 1
2) On the Details place the @Accum formula, putting your field into the second line:
WhilePrintingRecords;
StringVar Item:= {Your.Field}; // place your field in place of {Your.Field}
StringVar Chain;
NumberVar ChCnt;
if ChCnt = 1
then (ChCnt:= 2; chain := Item)
else
if Length(Chain) + Length(Item) > 254
then Chain := Chain else
chain := chain + ', ' + Item
3) On the Group Footer place the @Display formula:
WhilePrintingRecords;
StringVar Chain
**Important Note. A formula result (string) cannot be more than 254 characters. If your items add up to over 254 characters, this formula will not print them all. It will only print the first 254 characters. You could create a second parallell set of formulas that picks up where this one leaves off.
------------------
BTW, how can I obtain a list of "unique" value, for example a list of customers that have bought multiple items?
Thanks in advance,
Fedleo