Can any buddy tell me that how to do ranking on Subtotal.I mean Subtotal is not a field so how can I pass the value of Subtotal to the last parameter of Ranking.
April 01, 2005, 08:00 AM
<JG>
try the following
SET ASNAMES=ON TABLE FILE CAR SUM RETAIL_COST AS 'SUBTOT' BY COUNTRY ON TABLE HOLD AS CARHOLD FORMAT FOCUS INDEX COUNTRY END JOIN COUNTRY IN CAR TO COUNTRY IN CARHOLD
TABLE FILE CAR SUM RETAIL_COST DEALER_COST RANKED BY HIGHEST SUBTOT NOPRINT BY COUNTRY SUBTOTAL BY CAR ON TABLE PCHOLD FORMAT PDF END
April 01, 2005, 09:50 AM
j.gross
Do you want to 'rank' the countries, or just order them?
Ranked, in a single table request:
DEFINE FILE CAR TRCOST/D6=RETAIL_COST; END TABLE FILE CAR SUM TRCOST WITHIN COUNTRY NOPRINT RETAIL_COST RANKED BY HIGHEST TOTAL TRCOST NOPRINT BY COUNTRY SUBTOTAL PAGE-BREAK BY CAR BY MODEL ENDThis message has been edited. Last edited by: <Mabel>,
April 01, 2005, 10:34 AM
<JG>
Jack, That does not work because Although WebFocus calculates the TRCOST correctly, the BY's on CAR and Model cause a problem.
April 01, 2005, 11:25 AM
<Umm>
Hi JG,
Actually I have three fields categoryname, country and lineitemtotal, So I want to subtotal by Categoryname and pass the subtotal's value to the ranking, which display the report like category wise all the countries and LineItemTotal and at end of each category it will show subtotal.
April 01, 2005, 11:47 AM
<JG>
Sumit, using the join method as in the example should give you what you need.