I have never considered multi-input parameters but that might work really well.
you would only need one group that way
I would create a grouping formula
@Group
numberVar icount;
stringVar Result := Join({?ParamSortOrder},"/"

;
if Result = "Products/Salesperson/Customer" then
{table.products} + "/" + {table.Salesperson} + "/" +
{table.Customer}
else if Result = "Products/Customer/Salesperson" then
{table.products} + "/" + {table.Customer} + "/" +
{table.Salesperson}
else if Result = "Salesperson/Products/Customer" then
{table.Salesperson} + "/" + {table.products} + "/" +
{table.Customer}
else if Result = "Salesperson/Customer/Products" then
{table.Salesperson} + "/" + {table.Customer} + "/" +
{table.products}
else if Result = "Customer/Salesperson/Products" then
{table.Customer} + "/" + {table.Salesperson} + "/" +
{table.products}
else if Result = "Customer/Products/Salesperson" then
{table.Customer} + "/" + {table.products} + "/" +
{table.Salesperson}
//always have a catch-all default, incase of bad input
else
{table.products} + "/" + {table.Salesperson} + "/" +
{table.Customer} ;
I might make your inputs for {?ParamSortOrder}simpler to
"P" for Products, "S" for Salesman and "C" for Customer
put that in yur parameter description
then your comparison could be
if upperCase(Result) = "P/S/C" then
this would make user input simpler and account for mixed case.
I have never tried this but think it will work...
Jim Broadbent