It sounds like you only want to have 1 grouping but it would be variable, or you have multiple groupings and you want them to change order when a the 'top' level is changed...hopefully one of these is correct.
DBlank is right, first have your parameter of how you want to group (it could be the top group and the rest is dictated off of that). Once the user has selected a value for the parameter, it's time for ...formulas...
Now depending on if this one group that is affected or all three depends on the number of formulas you need to make. It is basically 1 formula per level of grouping you want to change.
the formulas are pretty basic, something like:
if {?parameter} = x then
{table.fieldx}
else
if {?parameter} = y then
{table.fieldy}
else
{table.fieldz}
could continue. again, make one formula for group you want to be dynamic, cut and paste works for me, just change the {table.field} around to be correct for the group.
Last, go to the group, right click and select change group, now instead of the {table.field} that is there, select the correct formula.
Thanks to Brian for this, it has been a boon to my report writing.
HTH