OK, let's see if I can clear up my post. I would create a formula. Since you are using summary values, hopefully they are 'simple', by which I mean that they are derived using the common aggregates like SUM() and COUNT().
If they are common aggregates, you can create a formula like:
if @param = 1 then //just for instance
SUM({table.revenue}, customer group); //for sorting by revenue
else
SUM({table.revenue}, customer group) / SUM({table.revenue}) //percentage of a customer vs the entire report
if you want, you can drop the formula on the gf line and see if reports the correct number (this just tests that the formula is working as desired). I am assuming that there is a grouping on the customer, otherwise this may need refinement.
Now since you want to sort all of your group based on the formula, create a group that will be 'above' the customer grouping. Instead of selecting a table field to group on, select the formula that you just created...The report will now sort based on the parameter.
HTH
Edited by lockwelle - 02 Dec 2009 at 8:58am