Focal Point
Sort on the subtotal
March 25, 2008, 11:35 AM
moyer1dlSort on the subtotal
I have a report that has a subtotal for each vendors various expenses. How can I sort on that subtotal so I can view the vendor with the highest expenses to the vendor with the lowest expenses but yet keep the various expense (dont want to aggregate) categories for each vendor?
IBM Main Frame: MVS, FIX, VSAM
Windows SQL
WF 7.7
March 25, 2008, 12:13 PM
GinnyJakesJust off the top of my head, how about a multi-verb request, the first one being the summarization sorting BY HIGHEST and the second being the detail?
Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
March 25, 2008, 01:11 PM
LeahAnd to add to Ginny's comment, you can do a NOPRINT on the output of the first verb so it doesn't show on the report, just the detail you want.
Leah
March 25, 2008, 03:37 PM
moyer1dlThis is the code where I have tried to take your suggestions. I am still not able to get the detail on the last three fields.
TABLE FILE LRDRAFT
SUM
DRAFTAMT
SSEMPIDNO
print EXPTYP
PAYCODE
DraftAMT
BY HIGHEST DRAFTAMT NOPRINT
BY PAYEENAME
ON PAYEENAME SKIP-LINE
HEADING
"Total Payee Expenses Paid in the CASRS system Between 01/01/07 to 12/31/07"
" "
FOOTING
" "
"&DATE <+0>
IBM Main Frame: MVS, FIX, VSAM
Windows SQL
WF 7.7
March 25, 2008, 03:48 PM
Francis MarianiTry something like this (the keyword TOTAL should solve the problem):
TABLE FILE CAR
SUM
RETAIL_COST NOPRINT
BY HIGHEST TOTAL RETAIL_COST NOPRINT
BY COUNTRY
SUM
RETAIL_COST
BY HIGHEST TOTAL RETAIL_COST NOPRINT
BY COUNTRY
BY CAR
ON COUNTRY SUBTOTAL AS 'TOTAL'
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 25, 2008, 03:52 PM
GinnyJakesYou need to sort the sales in the summary section of your report. Use this as an example:
TABLE FILE CAR
SUM SALES
BY HIGHEST TOTAL SALES NOPRINT
BY COUNTRY
PRINT SALES
BY HIGHEST TOTAL SALES NOPRINT
BY COUNTRY
BY CAR
END
Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
March 25, 2008, 03:53 PM
GinnyJakesGreat minds think alike, Francis.
Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
March 25, 2008, 04:00 PM
Francis MarianiYup!
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server