Just a follow up. Thanks to Geoff I now pass a "Grouping String" to the report, which passes it on to the stored proc. This "Grouping String" is concatenation of two to four fields. This lets me set the grouping in the report to the column created by the stored proc for the "Grouping string". Therefore I don't have to do anything on the report to change the grouping, it is always set to this column and I can still drill down to the detail. Right now I have nine different groupings I let the user select.
1. Shipping State/City to Destination State/City
2. Shipping State/City to Destination State
3. Shipping State/City to Destination Zip
4. Shipping State to Destination State/City
5. Shipping State to Destination State
6. Shipping State to Destination Zip
7. Shipping Zip to Destination State/City
8. Shipping Zip to Destination State
9. Shipping Zip to Destination Zip
The actual string I pass looks like the following for # 2
Code:
&Group1=ShipState + %2B + ', ' + %2B + ShipCity + %2B + ' To ' + %2B + DestState
On the report it looks like this
Code:
OH, CLEVELAND To TX
OH, COLUMBUS To TX
...
The user may also select from one to 5 digits of the zip code for the grouping. This report is being used to analyze costs and profits between various shipping and destination locations.
Auguy
Northwest Ohio