Look up the documentation on Groupings.
Thankyou very much, I found the just the thing I needed.