November 17, 2006, 02:46 AM
NarendarHelp regarding subtotals
i have this requirement in which i have to recompute according one field and in display i dont want to diplay On Field...
eg code is
TABLE FILE STR_HRS
PRINT
X
BY
V_STR
BY
EMPLID
ON V_STR RECOMPUTE
V_WRKDHRS AS 'TOTAL'
This will print the sub total row as
TOTAL Value of V_STR
but my requirement is to print that as
TOTAL DUES which is constant for all subtotals...
any help regarding this will be highly appreciated
November 17, 2006, 10:12 AM
reFOCUSingI think you are missing some code. I don't understand why you are using RECOMPUTE instead of SUBTOTAL?
Is this what your trying to do:
TABLE FILE CAR
SUM
RETAIL_COST
BY COUNTRY
BY CAR
ON COUNTRY SUBTOTAL AS 'TOTAL FOR'
END
-RUN
If not can you please explain by using the CAR table.
November 19, 2006, 10:26 PM
Narendaryes i am trying to that only,but my problem is ...if suppose in u r eg country is USA then in the o/p the subtotal will be displayed as
TOTAL FOR USA .....but i dont want this instead i want to display my own text there....e.g
Dues
November 20, 2006, 01:51 AM
PiipsterUse a SUBFOOT instead of a SUBTOTAL.
November 20, 2006, 04:50 AM
msahlUse dummy define field and sort by that with noprint:
DEFINE FILE CAR
DUMMY/A1='';
END
TABLE FILE CAR
SUM
RETAIL_COST
BY COUNTRY
BY DUMMY NOPRINT
BY CAR
ON DUMMY SUBTOTAL AS 'TOTAL FOR'
END
November 20, 2006, 05:09 AM
Narendarthanks msahl for the solution this is working ...
now i have another query in the same line of the subtotal i want to display the count of the number of rows returned under one of the columns...
any help regd the same will be highly appreciated