This is not too difficult.
1. Create a parameter so that you pass into the report how you want it grouped. (I'll call it {?Grouping})
2. Create two formulas (I'll call them
{@Group1} and
{@Group2}):
{@Group1} is
If {?Grouping} = "By Number" then {number field} else {sequence field}
{@Group2} is
If {?Grouping} = "By Number then {sequence field} else {number field}
3. Use these formulas for your groups.
If one of the fields is a number and one is a string, you'll have to convert the number to a string. However, there is a trick to this because numbers converted to strings sort like strings. For example:
Number Sort String Sort
1 1
2 10
3 2
10 22
22 10
So, you have to do something like this to get it to sort correctly:
Right(" " + ToText({number field}, 0), 10)
Between the quotes should be the spaces (or zeroes) to match the length of the number field. You would also change "10" to the length of the number field.
-Dell