Hello, How can I add a column title above 2 columns titles, like you see in the following example:
My output is in HTML. I already try the HEADALIGN option, but I think that is not the answer to my problem.
What I want is a way to group columns.
Thanks, Carlos DiasThis message has been edited. Last edited by: Carlos Dias,
WebFOCUS version: 7.6 Linux/Windows HTML, Excel
April 05, 2012, 04:42 PM
Mary Watermann
Carlos,
Have you tried using ACROSS for the Merge Title 1 and 2?
TABLE FILE CAR
SUM
DEALER_COST
SALES
ACROSS COUNTRY
END
Either that or put the column titles in the heading section and then HEADALIGN will work.
WF 7.6.10, Windows, PDF, Excel
April 06, 2012, 02:50 AM
Danny-SRL
Carlos,
Try this:
-* File HEADALIGN1.fex
TABLE FILE CAR
HEADING
"Manufacturers<+>Financial<+0>Physical"
PRINT
RCOST
DCOST
MPG RPM
BY COUNTRY
BY CAR
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=HEADING, HEADALIGN=BODY, $
TYPE=HEADING, LINE=1, ITEM=1, JUSTIFY=LEFT, COLSPAN=2, $
TYPE=HEADING, LINE=1, ITEM=2, JUSTIFY=CENTER, COLSPAN=2, $
TYPE=HEADING, LINE=1, ITEM=3, JUSTIFY=CENTER, COLSPAN=2, $
ENDSTYLE
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
April 09, 2012, 06:57 AM
Carlos Dias
Danny, Works fine... but when I add the following style:
Note changes: HTMLCSS = OFF and GRID=OFF along with adding color to the Heading Section.
WF 7.6.10, Windows, PDF, Excel
April 09, 2012, 11:04 AM
Danny-SRL
Carlos,
You hit the "Border Problem". When you use "border" then "grid" is disabled. Then WF inserts a blank line between the HEADING and the TITLES.
So, using your code, you have 2 possibilities. 1. BORDER
-* File HEADALIGN2.fex
TABLE FILE CAR
HEADING
"Manufacturers<+>Financial<+0>Physical"
PRINT
RCOST
DCOST
MPG RPM
BY COUNTRY
BY CAR
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=HEADING, HEADALIGN=BODY,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-COLOR=RGB(200 200 200),
BORDER-BOTTOM-COLOR=RGB(200 200 200),
BORDER-LEFT-COLOR=RGB(200 200 200),
BORDER-RIGHT-COLOR=RGB(200 200 200),
style=bold,
COLOR='WHITE',
BACKCOLOR=RGB(115 150 191),
$
TYPE=HEADING, LINE=1, ITEM=1, JUSTIFY=LEFT, COLSPAN=2, $
TYPE=HEADING, LINE=1, ITEM=2, JUSTIFY=CENTER, COLSPAN=2, $
TYPE=HEADING, LINE=1, ITEM=3, JUSTIFY=CENTER, COLSPAN=2, $
TYPE=REPORT,
COLOR='BLACK',
FONT='VERDANA',
UNITS=IN,
SIZE=7,
SQUEEZE=ON,
-* GRID=ON,
PAGESIZE='A4',
$
TYPE=TITLE,
style=bold,
COLOR='WHITE',
BACKCOLOR=RGB(115 150 191),
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-COLOR=RGB(200 200 200),
BORDER-BOTTOM-COLOR=RGB(200 200 200),
BORDER-LEFT-COLOR=RGB(200 200 200),
BORDER-RIGHT-COLOR=RGB(200 200 200),
$
ENDSTYLE
END
2. GRID
-* File HEADALIGN3.fex
TABLE FILE CAR
HEADING
"Manufacturers<+>Financial<+0>Physical"
PRINT
RCOST
DCOST
MPG RPM
BY COUNTRY
BY CAR
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=HEADING, HEADALIGN=BODY,
style=bold,
COLOR='WHITE',
BACKCOLOR=RGB(115 150 191),
$
TYPE=HEADING, LINE=1, ITEM=1, JUSTIFY=LEFT, COLSPAN=2, $
TYPE=HEADING, LINE=1, ITEM=2, JUSTIFY=CENTER, COLSPAN=2, $
TYPE=HEADING, LINE=1, ITEM=3, JUSTIFY=CENTER, COLSPAN=2, $
TYPE=REPORT,
COLOR='BLACK',
FONT='VERDANA',
UNITS=IN,
SIZE=7,
SQUEEZE=ON,
GRID=ON,
PAGESIZE='A4',
$
TYPE=TITLE,
style=bold,
COLOR='WHITE',
BACKCOLOR=RGB(115 150 191),
$
ENDSTYLE
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
April 09, 2012, 10:22 PM
njsden
For cases like those, I've given up on WebFOCUS Style Sheets and had to resort to using SUBHEAD + external CSS styling instead. It gives finer control though is only applicable to HTML reports ... still, something to consider as an alternative.