I assume the user is selecting the group based on a parameter. So, this is actually fairly easy.
Create a formula that looks something like this (not know what your groups are, I'm writing this base on my data):
if {?GroupName} = 'Loan Number' then
{loan.loan_number}
else if {?GroupName} = 'Property State' then
{loan.property_state}
else if {?GroupName} = 'Posting Date' then
ToText({loan.posting_date}, 'yyyyMMdd')
All of the results have to be in the same format - string, number, etc. - so you may have to do some conversion based on the field type. So, you can see that I converted the date field to text. When you're working with dates that have been converted to text, you have to format them differently when you're using them to sort data than if you're just displaying them because they'll sort in text order instead of in date order.
Once you have your formula set up, use that as your group instead of a specific field.
-Dell
Edited by hilfy - 21 Oct 2007 at 9:32am