Syed,
When ever you use SUBTOTAL-SUB-TOTAL-RECOMPUTE-SUMMARIZE, WebFOCUS calculates the length of the column you are doing these on, and, will FOLD-LINE on these total lines if the calculated length overrides the total columns.
If you only want totals on 1 line, I have found COMPUTE with RECAP with SUBFOOT works for me:
COMPUTE
COL1_BL/A13 = ' '; NOPRINT
COMPUTE
COL1_EXP/P13.2C = IF SORT_01 EQ '1' THEN REVISED ELSE 0; NOPRINT
COMPUTE
COL1_RCT/P13.2C = IF SORT_01 EQ '2' THEN REVISED ELSE 0; NOPRINT
COMPUTE
COL2_EXP/P13.2C = IF SORT_01 EQ '1' THEN UNALLOTTED ELSE 0; NOPRINT
COMPUTE
COL2_RCT/P13.2C = IF SORT_01 EQ '2' THEN UNALLOTTED ELSE 0; NOPRINT
COMPUTE
COL3_EXP/P13.2C = IF SORT_01 EQ '1' THEN ALLOTTED ELSE 0; NOPRINT
COMPUTE
COL3_RCT/P13.2C = IF SORT_01 EQ '2' THEN ALLOTTED ELSE 0; NOPRINT
COMPUTE
COL4_EXP/P13.2C = IF SORT_01 EQ '1' THEN MTD ELSE 0; NOPRINT
COMPUTE
COL4_RCT/P13.2C = IF SORT_01 EQ '2' THEN MTD ELSE 0; NOPRINT
COMPUTE
COL5_EXP/P13.2C = IF SORT_01 EQ '1' THEN PTD ELSE 0; NOPRINT
COMPUTE
COL5_RCT/P13.2C = IF SORT_01 EQ '2' THEN PTD ELSE 0; NOPRINT
COMPUTE
COL6_EXP/P13.2C = IF SORT_01 EQ '1' THEN UNEXPENDED ELSE 0; NOPRINT
COMPUTE
COL6_RCT/P13.2C = IF SORT_01 EQ '2' THEN UNEXPENDED ELSE 0; NOPRINT
COMPUTE
COL7_EXP/P13.2C = IF SORT_01 EQ '1' THEN ENCUMB ELSE 0; NOPRINT
COMPUTE
COL7_RCT/P13.2C = IF SORT_01 EQ '2' THEN ENCUMB ELSE 0; NOPRINT
BY FUND_LEV_4 NOPRINT
BY BUDG_CD NOPRINT
BY PROG_CD NOPRINT
BY GRANT_ID NOPRINT NOSPLIT
BY X_FUND NOPRINT
BY SORT_01 NOPRINT
BY SUM_DESC NOPRINT SKIP-LINE
BY X_ACCT NOPRINT
BY ACCT_01 AS 'ACCOUNT - DESC'
BY X_ACTIVITY NOPRINT
BY ACT_01 AS 'ACTIVITY - DESC'
ON SUM_DESC SUBTOTAL AS 'TOTAL '
ON GRANT_ID SUBHEAD
"<GRANT_ID [ <FUND ) - <GRANTTITLE </1"
ON GRANT_ID RECAP
COL1_TOT1/P13.2C = COL1_RCT - COL1_EXP;
COL2_TOT1/P13.2C = COL2_RCT - COL2_EXP;
COL3_TOT1/P13.2C = COL3_RCT - COL3_EXP;
COL4_TOT1/P13.2C = COL4_RCT - COL4_EXP;
COL5_TOT1/P13.2C = COL5_RCT - COL5_EXP;
COL6_TOT1/P13.2C = COL6_RCT - COL6_EXP;
COL7_TOT1/P13.2C = COL7_RCT - COL7_EXP;
SPECIAL/A18 = ' - Appropriations:';;
COLON/A1 = ':';
-*
ON GRANT_ID SUBFOOT
" "
" "
" "
" "
"TOTAL for Grant <GRANT_ID : <COL1_TOT1<COL2_TOT1<COL3_TOT1<COL4_TOT1<COL5_TOT1<COL6_TOT1<COL7_TOT1"
WHEN COL1_TOT1 EQ 0;
ON GRANT_ID SUBFOOT
" "
" "
" "
" "
"TOTAL for Grant <GRANT_ID - Appropriations: <COL1_TOT1<COL2_TOT1<COL3_TOT1<COL4_TOT1<COL5_TOT1<COL6_TOT1<COL7_TOT1"
-*********************
WHEN COL1_TOT1 NE 0;
-*********************
ON GRANT_ID UNDER-LINE
-*
-* BUDGET RECALCULATIONS
-*
ON BUDG_CD RECAP
COL1_TOT2/P13.2C = (COL1_RCT - COL1_EXP);
COL2_TOT2/P13.2C = (COL2_RCT - COL2_EXP);
COL3_TOT2/P13.2C = (COL3_RCT - COL3_EXP);
COL4_TOT2/P13.2C = (COL4_RCT - COL4_EXP);
COL5_TOT2/P13.2C = (COL5_RCT - COL5_EXP);
COL6_TOT2/P13.2C = (COL6_RCT - COL6_EXP);
COL7_TOT2/P13.2C = (COL7_RCT - COL7_EXP);
SUM01_EXP/P13.2C = COL1_EXP;
SUM02_EXP/P13.2C = COL2_EXP;
SUM03_EXP/P13.2C = COL3_EXP;
SUM04_EXP/P13.2C = COL4_EXP;
SUM05_EXP/P13.2C = COL5_EXP;
SUM06_EXP/P13.2C = COL6_EXP;
SUM07_EXP/P13.2C = COL7_EXP;
SUM01_RCT/P13.2C = COL1_RCT;
SUM02_RCT/P13.2C = COL2_RCT;
SUM03_RCT/P13.2C = COL3_RCT;
SUM04_RCT/P13.2C = COL4_RCT;
SUM05_RCT/P13.2C = COL5_RCT;
SUM06_RCT/P13.2C = COL6_RCT;
SUM07_RCT/P13.2C = COL7_RCT;
ON BUDG_CD SUBFOOT
" "
"TOTAL for EXPENSES : <SUM01_EXP<SUM02_EXP<SUM03_EXP<SUM04_EXP<SUM05_EXP<SUM06_EXP<SUM07_EXP"
"TOTAL for RECEIPTS : <SUM01_RCT<SUM02_RCT<SUM03_RCT<SUM04_RCT<SUM05_RCT<SUM06_RCT<SUM07_RCT"
" "
"TOTAL for Budget <BUDG_CD : <COL1_TOT2<COL2_TOT2<COL3_TOT2<COL4_TOT2<COL5_TOT2<COL6_TOT2<COL7_TOT2"
-*********************
WHEN COL1_TOT2 EQ 0;
-*********************
ON BUDG_CD SUBFOOT
" "
"TOTAL for EXPENSES : <SUM01_EXP<SUM02_EXP<SUM03_EXP<SUM04_EXP<SUM05_EXP<SUM06_EXP<SUM07_EXP"
"TOTAL for RECEIPTS : <SUM01_RCT<SUM02_RCT<SUM03_RCT<SUM04_RCT<SUM05_RCT<SUM06_RCT<SUM07_RCT"
" "
"TOTAL for Budget <BUDG_CD - Appropriations: <COL1_TOT2<COL2_TOT2<COL3_TOT2<COL4_TOT2<COL5_TOT2<COL6_TOT2<COL7_TOT2"
-*********************
WHEN COL1_TOT2 NE 0;
-*********************
-*
-* PROGRAM RECALCULATIONS
-*
ON PROG_CD RECAP
COL1_TOT3/P13.2C = (COL1_RCT - COL1_EXP);
COL2_TOT3/P13.2C = (COL2_RCT - COL2_EXP);
COL3_TOT3/P13.2C = (COL3_RCT - COL3_EXP);
COL4_TOT3/P13.2C = (COL4_RCT - COL4_EXP);
COL5_TOT3/P13.2C = (COL5_RCT - COL5_EXP);
COL6_TOT3/P13.2C = (COL6_RCT - COL6_EXP);
COL7_TOT3/P13.2C = (COL7_RCT - COL7_EXP);
SUM11_EXP/P13.2C = COL1_EXP;
SUM12_EXP/P13.2C = COL2_EXP;
SUM13_EXP/P13.2C = COL3_EXP;
SUM14_EXP/P13.2C = COL4_EXP;
SUM15_EXP/P13.2C = COL5_EXP;
SUM16_EXP/P13.2C = COL6_EXP;
SUM17_EXP/P13.2C = COL7_EXP;
SUM11_RCT/P13.2C = COL1_RCT;
SUM12_RCT/P13.2C = COL2_RCT;
SUM13_RCT/P13.2C = COL3_RCT;
SUM14_RCT/P13.2C = COL4_RCT;
SUM15_RCT/P13.2C = COL5_RCT;
SUM16_RCT/P13.2C = COL6_RCT;
SUM17_RCT/P13.2C = COL7_RCT;
ON PROG_CD SUBFOOT
" "
"TOTAL for EXPENSES : <SUM11_EXP<SUM12_EXP<SUM13_EXP<SUM14_EXP<SUM15_EXP<SUM16_EXP<SUM17_EXP"
"TOTAL for RECEIPTS : <SUM11_RCT<SUM12_RCT<SUM13_RCT<SUM14_RCT<SUM15_RCT<SUM16_RCT<SUM17_RCT"
" "
"TOTAL for Program <PROG_CD : <COL1_TOT3<COL2_TOT3<COL3_TOT3<COL4_TOT3<COL5_TOT3<COL6_TOT3<COL7_TOT3"
-*********************
FOOTING
"FWRWCIFD.FEX"
ON TABLE NOTOTAL
-SET &HOLDTYPE = IF &BATCHIND EQ 'Y' THEN 'HOLD' ELSE 'PCHOLD';
ON TABLE &HOLDTYPE FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET GRID OFF
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='LETTER',
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=TITLE,
SIZE=9,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=9,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=10,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=8,
STYLE=BOLD,
JUSTIFY=LEFT,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
HEADALIGN=BODY,
STYLE=BOLD,
$
TYPE=SUBFOOT, LINE=2, ITEM=1, JUSTIFY=LEFT , STYLE=BOLD, SIZE=8,$
TYPE=SUBFOOT, LINE=2, ITEM=2, STYLE=BOLD, SIZE=8, POSITION = REVISED,$
TYPE=SUBFOOT, LINE=2, ITEM=3, STYLE=BOLD, SIZE=8, POSITION = UNALLOTTED,$
TYPE=SUBFOOT, LINE=2, ITEM=4, STYLE=BOLD, SIZE=8, POSITION = ALLOTTED,$
TYPE=SUBFOOT, LINE=2, ITEM=5, STYLE=BOLD, SIZE=8, POSITION = MTD,$
TYPE=SUBFOOT, LINE=2, ITEM=6, STYLE=BOLD, SIZE=8, POSITION = PTD,$
TYPE=SUBFOOT, LINE=2, ITEM=7, STYLE=BOLD, SIZE=8, POSITION = UNEXPENDED,$
TYPE=SUBFOOT, LINE=2, ITEM=8, STYLE=BOLD, SIZE=8, POSITION = ENCUMB,$
-*
TYPE=SUBFOOT, LINE=3, ITEM=1, JUSTIFY=LEFT , STYLE=BOLD, SIZE=8,$
TYPE=SUBFOOT, LINE=3, ITEM=2, STYLE=BOLD, SIZE=8, POSITION = REVISED,$
TYPE=SUBFOOT, LINE=3, ITEM=3, STYLE=BOLD, SIZE=8, POSITION = UNALLOTTED,$
TYPE=SUBFOOT, LINE=3, ITEM=4, STYLE=BOLD, SIZE=8, POSITION = ALLOTTED,$
TYPE=SUBFOOT, LINE=3, ITEM=5, STYLE=BOLD, SIZE=8, POSITION = MTD,$
TYPE=SUBFOOT, LINE=3, ITEM=6, STYLE=BOLD, SIZE=8, POSITION = PTD,$
TYPE=SUBFOOT, LINE=3, ITEM=7, STYLE=BOLD, SIZE=8, POSITION = UNEXPENDED,$
TYPE=SUBFOOT, LINE=3, ITEM=8, STYLE=BOLD, SIZE=8, POSITION = ENCUMB,$
-*
TYPE=SUBFOOT, LINE=4, ITEM=1, JUSTIFY=LEFT , STYLE=BOLD, SIZE=8,$
TYPE=SUBFOOT, LINE=4, ITEM=2, STYLE=BOLD, SIZE=8, POSITION = REVISED,$
TYPE=SUBFOOT, LINE=4, ITEM=3, STYLE=BOLD, SIZE=8, POSITION = UNALLOTTED,$
TYPE=SUBFOOT, LINE=4, ITEM=4, STYLE=BOLD, SIZE=8, POSITION = ALLOTTED,$
TYPE=SUBFOOT, LINE=4, ITEM=5, STYLE=BOLD, SIZE=8, POSITION = MTD,$
TYPE=SUBFOOT, LINE=4, ITEM=6, STYLE=BOLD, SIZE=8, POSITION = PTD,$
TYPE=SUBFOOT, LINE=4, ITEM=7, STYLE=BOLD, SIZE=8, POSITION = UNEXPENDED,$
TYPE=SUBFOOT, LINE=4, ITEM=8, STYLE=BOLD, SIZE=8, POSITION = ENCUMB,$
-*
TYPE=SUBFOOT, LINE=5, ITEM=1, JUSTIFY=LEFT , STYLE=BOLD, SIZE=8,$
TYPE=SUBFOOT, LINE=5, ITEM=2, JUSTIFY=LEFT , STYLE=BOLD, SIZE=8,$
TYPE=SUBFOOT, LINE=5, ITEM=3, JUSTIFY=LEFT , STYLE=BOLD, SIZE=8, COLOR = RED, WHEN=COL1_TOT1 NE 0,$
TYPE=SUBFOOT, LINE=5, ITEM=3, JUSTIFY=LEFT , STYLE=BOLD, SIZE=8, WHEN=COL1_TOT1 EQ 0,$
TYPE=SUBFOOT, LINE=5, ITEM=4, STYLE=BOLD, SIZE=8, POSITION = REVISED,$
TYPE=SUBFOOT, LINE=5, ITEM=5, STYLE=BOLD, SIZE=8, POSITION = UNALLOTTED,$
TYPE=SUBFOOT, LINE=5, ITEM=6, STYLE=BOLD, SIZE=8, POSITION = ALLOTTED,$
TYPE=SUBFOOT, LINE=5, ITEM=7, STYLE=BOLD, SIZE=8, POSITION = MTD,$
TYPE=SUBFOOT, LINE=5, ITEM=8, STYLE=BOLD, SIZE=8, POSITION = PTD,$
TYPE=SUBFOOT, LINE=5, ITEM=9, STYLE=BOLD, SIZE=8, POSITION = UNEXPENDED,$
TYPE=SUBFOOT, LINE=5, ITEM=10, STYLE=BOLD, SIZE=8, POSITION = ENCUMB,$
-*
ENDSTYLE
END
-EXIT
-*****************************************************************************
Tom
Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe