I only specify a subtotal(SUMMARIZE) on one field, this field is on the 2nd BY statement. The result will show 2 subtotal lines, the first subtotal is the one I specified, the other is from the 1st BY statement. Please see my sample codes and results. How can I remove subtotal by COUNTRY?
TABLE FILE CAR SUM DEALER_COST RETAIL_COST BY COUNTRY NOPRINT BY CARS NOPRINT BY MODEL ON CARS SUMMARIZE AS 'Total' END
Here is result;
PAGE 1
MODEL DEALER_COST RETAIL_COST V12XKE AUTO 7,427 8,878 XJ12L AUTO 11,194 13,491 Total JAGUAR 18,621 22,369 INTERCEPTOR III 14,940 17,850 Total JENSEN 14,940 17,850 TR7 4,292 5,100 Total TRIUMPH 4,292 5,100 *TOTAL COUNTRY ENGLAND 37,853 45,319 504 4 DOOR 4,631 5,610 Total PEUGEOT 4,631 5,610 *TOTAL COUNTRY FRANCE 4,631 5,610 2000 GT VELOCE 5,660 6,820 2000 SPIDER VELOCE 5,660 6,820 2000 4 DOOR BERLINA 4,915 5,925 Total ALFA ROMEO 16,235 19,565 DORA 2 DOOR 25,000 31,500 Total MASERATI 25,000 31,500 *TOTAL COUNTRY ITALY 41,235 51,065 B210 2 DOOR AUTO 2,626 3,139 Total DATSUN 2,626 3,139 COROLLA 4 DOOR DIX AUTO 2,886 3,339 Total TOYOTA 2,886 3,339 *TOTAL COUNTRY JAPAN 5,512 6,478 100 LS 2 DOOR AUTO 5,063 5,970 Total AUDI 5,063 5,970 2002 2 DOOR 5,800 5,940 2002 2 DOOR AUTO 6,000 6,355 3.0 SI 4 DOOR 10,000 13,752 3.0 SI 4 DOOR AUTO 11,000 14,123 530I 4 DOOR 8,300 9,097 530I 4 DOOR AUTO 8,400 9,495 Total BMW 49,500 58,762 *TOTAL COUNTRY W GERMANY 54,563 64,732 PAGE 2
MODEL DEALER_COST RETAIL_COST TOTAL 143,794 173,204
ThanksThis message has been edited. Last edited by: May,
May
WebFOCUS 7.6.8 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - MS SQL Server 2005 - DataMigrator 7.6.9
February 25, 2011, 03:38 PM
Tom Flynn
Read up on the differences with SUBTOTAL, SUB-TOTAL, SUMMARIZE and RECOMPUTE...
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
BY COUNTRY NOPRINT
BY CARS NOPRINT SUBTOTAL AS 'Total'
BY MODEL
-* ON CARS SUMMARIZE AS 'Total'
END