[CLOSED] Formatting SUBTOTAL on Excel with COMPOUND=BYTOC
Hi,
SET LINES = 99999
SET BYDISPLAY = ON
SET COMPOUND = BYTOC
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
SALES
BY COUNTRY NOPRINT
ON COUNTRY SUBTOTAL SALES AS ''
ON TABLE PCHOLD FORMAT EXL2K
END
To sum up my problem, with this code I get this:
ENGLAND JAGUAR V12XKEAUTO 0 ENGLAND JAGUAR XJ12LAUTO 12000 ENGLAND JENSEN INTERCEPTORIII 0 ENGLAND TRIUMPH TR7 0 ENGLAND BLANK BLANK BLANK 12000
But I would like to obtain this:
ENGLAND JAGUAR V12XKEAUTO 0 ENGLAND JAGUAR XJ12LAUTO 12000 ENGLAND JENSEN INTERCEPTORIII 0 ENGLAND TRIUMPH TR7 0 BLANK BLANK BLANK 12000
Any idea? I looked for a solution on the Webfocus Help and on this forum but I didn't find the solution.This message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.4 running on Windows Output formats : PDF, Excel and HTML My blog
July 05, 2010, 10:46 AM
Dan Satchell
To get the output the way you want, I think you will need to use SUBFOOT instead of SUBTOTAL. Try this:
SET LINES = 99999
SET BYDISPLAY = ON
SET COMPOUND = BYTOC
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
SALES
BY COUNTRY NOPRINT
ON COUNTRY SUBFOOT
"<+0> <+0> <+0> <ST.SALES "
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=SUBFOOT, HEADALIGN=BODY, $
ENDSTYLE
END
Edit: Need to use ST.SALES instead of TOT.SALES in the SUBFOOT.This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
July 05, 2010, 10:49 AM
PBax
i posted this just after Dan, his method would be better, im using the dirty 'white text' method to do some painting over.
===================================
This should do it
SET LINES = 99999 SET BYDISPLAY = ON SET COMPOUND = BYTOC DEFINE FILE CAR BLANK/A1 WITH COUNTRY=''; END
TABLE FILE CAR PRINT CAR MODEL SALES BY COUNTRY BY BLANK NOPRINT
ON COUNTRY SUBTOTAL AS ''
ON BLANK SUBTOTAL AS ' ' ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=10, $ TYPE=SUBTOTAL, BY=1, COLOR='WHITE', $ ENDSTYLE END
81.05 All formats
July 05, 2010, 05:35 PM
Waz
I think that only the BLANK option is needed.
SET LINES = 99999
SET BYDISPLAY = ON
SET COMPOUND = BYTOC
DEFINE FILE CAR
BLANK/A1 = ' ' ;
END
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
SALES
BY COUNTRY NOPRINT
BY BLANK NOPRINT
ON BLANK SUBTOTAL SALES AS ''
ON TABLE PCHOLD FORMAT EXL2K
END
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
July 07, 2010, 09:50 AM
Jérény Deidda
Thanks guys, I will try these solutions and give you my feedback.
WebFOCUS 7.6.4 running on Windows Output formats : PDF, Excel and HTML My blog