Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine Multiple Records further question 1

Status
Not open for further replies.

mattz196

Technical User
Jan 30, 2004
8
AU
firstly thank you for previous help
i used
//{@reset} for the group header:
whileprintingrecords;
stringvar colors := "";

//{@colors} for the detail section:
whileprintingrecords;
stringvar colors := colors + {table.color} + ", ";

//{@displaycolors} for the group footer section:
whileprintingrecords;
stringvar colors;
left(colors, len(colors)-2);

but find this gives a string of all the colors is there a way i can only return values relative to the group header

eg
9001 blue
9001 red
9002 pink
9002 green
would show
9001 blue,red
9002 pink,green

the above is grouped by the number
trust i have explained myself clearly

Thanks in advance
Matt

 
If you are grouping on the "9001" field--let's call it {table.itemID}--you then need to place {@reset} in the {table.itemID} group header, and the display formula in the {table.itemID} group footer.

The only way you could pick up colors not in that group is if you incorrectly placed the reset or display formulas in a higher order group or in the report header or footer.

Or, another possibility is that you have suppressed records with other colors that are getting picked up by the formulas, in which case you would need to build in the suppression criteria into your formula, as in this example:

//{@colors} for the detail section:
whileprintingrecords;
stringvar colors;

if {table.status} <> &quot;inactive&quot; then colors := colors + {table.color} + &quot;, &quot;;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top