You need to accumulate the records using a formula like the following:
//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar states := states + {table.state} + ", ";
//{@display} to be placed in the footer:
whileprintingrecords;
stringvar states;
left(states, len(states)-2)
If you are accumulating for display in a group footer, then use a reset formula in the group header:
whileprintingrecords;
stringvar states := "";
-LB