Focal Point
[SOLVED] Use Subfoot for Subtotals

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3651068403

October 31, 2008, 04:01 PM
ColdWhiteMilk
[SOLVED] Use Subfoot for Subtotals
I'm trying to create the subtotals in a subfoot line so that I can format them with the stylesheet.

What I need in my subtotal:
Column A: Should be blank
Column B: Should be the value from BUSUNIT.DESCR, left justified, italic font
Column C: Should be blank
Column D: Sub-totaled field, right justified, italic font
Column E: Sub-totaled field, right justified, italic font
Column F: Sub-totaled field, right justified, italic font
Column G: Sub-totaled field, right justified, italic font

Any help would be appreciated.

My Code:
JOIN CLEAR *

JOIN
LEFT_OUTER
BUSUNIT.BUSINESS_UNIT
IN BUSUNIT TO ALL BASELINE2.BUSINESS_UNIT_CODE
IN BASELINE2
AS J1
END

DEFINE FILE BUSUNIT
STATUSA/I8= IF BASELINE2.EMPLOYEE_STATUS_CODE EQ 'A' THEN 1 ELSE 0;
STATUSL/I8= IF BASELINE2.EMPLOYEE_STATUS_CODE EQ 'L' THEN 1 ELSE 0;
STATUSP/I8= IF BASELINE2.EMPLOYEE_STATUS_CODE EQ 'P' THEN 1 ELSE 0;
RECCOUNTER/I8 = 1;
SUBT1/A1 = '';
SUBT2/A15 = 'Subtotal for:';
END

TABLE FILE BUSUNIT
SUM 
BUSUNIT.DESCR AS 'Business Unit Name'
BASELINE2.REPNONREP AS 'Union Represented'
STATUSA AS 'A'
STATUSL AS 'L'
STATUSP AS 'P'
RECCOUNTER AS 'Total'

BY SUBT1 NOPRINT
BY BUSUNIT.BUSINESS_UNIT AS 'Business Unit Code'
BY BUSUNIT.DESCR NOPRINT

ON BUSUNIT.BUSINESS_UNIT SUBFOOT
"<+0> <BUSUNIT.DESCR<+0> <ST.STATUSA<+0 <ST.STATUSL<+0 <ST.STATUSP<+0 <ST.RECCOUNTER"
ON TABLE SET STYLE *
TYPE=HEADING, FONT=TIMES, COLOR=BLACK, SIZE=10, STYLE=BOLD, $
TYPE=TITLE, FONT=TIMES, COLOR=NAVY, SIZE=10, STYLE=BOLD+UNDERLINE, $
TYPE=REPORT, FONT=TIMES, TITLETEXT= &WKSTITLE1, $
TYPE=GRANDTOTAL, COLOR=BLACK, SIZE=10, STYLE=BOLD, $
TYPE=SUBFOOT, COLOR=BLACK, SIZE=9, STYLE=ITALIC, HEADALIGN=BODY, $
ENDSTYLE

ON TABLE PCHOLD FORMAT EXL2K
END

This message has been edited. Last edited by: Kerry,


Production - 7.6.4
Sandbox - 7.6.4
October 31, 2008, 06:36 PM
Darin Lee
In the TYPE=SUBFOOT section, you will need to create a line for each specific object (OBJECT=FIELD, ITEM=n) and style it appropriately using JUSTIFY=, STYLE=, POSITION= and other available options.

However, you are outputting the report to EXL2K format so many of the options you are wanting may not be available for Excel output.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
November 03, 2008, 09:01 AM
PBrightwell
quote:
ON BUSUNIT.BUSINESS_UNIT SUBFOOT
"<+0>

If they are coming out in the wrong columns try changing the above line to:
ON BUSINESS_UNIT SUBFOOT
"<+0> <BUSUNIT.DESCR <ST.STATUSA<ST.STATUSL<ST.STATUSP<ST.RECCOUNTER"


In your stylesheet, you do not need the object type. Since all of your fields are italic and most are right justified I would style it like this:
 
TYPE=SUBFOOT, HEADALIGN=BODY, STYLE=ITALIC, JUSTIFY=RIGHT,$
TYPE=SUBFOOT, LINE=1, ITEM=2, JUSTIFY=LEFT,$



Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes