You'll need to do a few things to achieve that.
Create a group for
NumberId
.Suppress the Group Header.
Create a FormulaField; we'll call it
@ColorReset
. It should contain the following code:WhilePrintingRecords; stringVar Colors := "";
Place this in your group header. This will reset the
Colors
stringVar every time the Group Header is hit.Suppress the Detail section.
Create another FormulaField; we'll call it
@ColorAppend
. It should concatenate the values like this:WhilePrintingRecords; stringVar Colors := Colors + ", " + {YourTable.InkColor};
Place this in your detail section. This will build your color string every time the Detail section loops.
Create one more FormulaField to show the colors, called
@ColorsShow
. It will display the colors like this:WhilePrintingRecords; StringVar Colors; RIGHT(Colors, LEN(Colors) - 2); // Strip off the leading comma and space
Place this in your group footer, along with the
NumberId
andART_No
Your end result should be:
---------- Group Header 1 ----------
/////////// @ColorReset ////////////
------------- Details --------------
////////// @ColorAppend ////////////
---------- Group Footer 1 ----------
[NumberId] [ART_No] [@ColorsShow]
It looks a little initmidating, but it's pretty straightforward.