Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     subtotal on secondary or tertiary sort field summarized at bottom of report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
subtotal on secondary or tertiary sort field summarized at bottom of report
 Login/Join
 
Gold member
posted
Long subject, I know.
Wondering if there are any McGyvers out there that may be able to help.
I would like to subtotal on a 3rd BY field but then have the subtotal for all those values at the bottom of the report.
TABLE FILE A
SUM
CNT.CUST_ID
BY CAMP
BY COMM
BY CHNL
END

I would like to subtotal BY CHNL after the SUM BY's

thanks

BobV


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
 
Posts: 93 | Registered: February 20, 2008Report This Post
Expert
posted Hide Post
You preprocess your "final report request" using your final "3rd sort field" as your primary sort and HOLD that to a file which you will JOIN to in your final report request where you'll PRINT/SUM the totals in the HOLD file in a footing where it's needed.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Bob,
You were right: it is a job for McGuyver:
  
-SET &ECHO=ALL;
-* File BobV01.fex
-*
SET NODATA = ' '
-*
JOIN BLANK WITH BODYTYPE IN CAR TO BLANK IN FSEQ AS B_
-*
DEFINE FILE CAR
BLANK/A1 WITH BODYTYPE=' ';
XCOUNTRY/A10=IF COUNTER EQ 2 THEN ' ' ELSE COUNTRY;
XCAR/A16=IF COUNTER EQ 2 THEN ' ' ELSE CAR;
END 
-*
TABLE FILE CAR
SUM SALES
BY COUNTER NOPRINT
BY XCOUNTRY AS COUNTRY
BY XCAR AS CAR
BY SEATS
ON XCOUNTRY SUBFOOT
" "
WHEN COUNTER EQ 1
ON XCOUNTRY SUBHEAD
"Recap by Seats"
WHEN COUNTER EQ 2
ON XCOUNTRY SUBTOTAL MULTILINES AS 'Total ' 

WHERE COUNTER LE 2

ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
include=endeflt,
$
-*
ENDSTYLE
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     subtotal on secondary or tertiary sort field summarized at bottom of report

Copyright © 1996-2020 Information Builders