February 05, 2008, 02:57 PM
KameshHow to sort this?
Hi,
I have to sort the following data.
Region City Car Count
East NY BMW 10
LEXUS 15
MERCEDES 5
MI BMW 3
CHEVY 14
SubTotal BMW 13
LEXUS 15
MERCEDES 5
CHEVY 14
west CA BMW 12
LEXUS 7
MERCEDES 8
WA BMW 3
CHEVY 4
SubTotal BMW 15
LEXUS 7
MERCEDES 8
CHEVY 4
The problem I have is when I sort by Region, Subtotal for WEST shows first and then WEST is showing.
Subtotal and Region value are coming from database Stored Procedure. We are not doing anything from our side to get the subtotal.
Please suggest me a way to get this,
Thanks
February 05, 2008, 03:17 PM
LeahCan you supply the code please and thank you. Need to see your 'BY' statements.
February 05, 2008, 04:29 PM
GinnyJakesTry SET PRINTPLUS=ON. This fixes a whole host of problems including where subtotals show up.
February 06, 2008, 09:36 AM
PBrightwellTry:
TABLE FILE yourfilename
PRINT
CAR
COUNT
BY REGION
BY CITY
ON REGION SUBTOTAL
WHERE CITY NE 'Subtotal'
END