Focal Point
[SOLVED] Column Title Break with OVER

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

December 17, 2009, 02:32 PM
atturhari
[SOLVED] Column Title Break with OVER
Hi,

I want to break the column title into two.
The comma (CAR,TYPE) does not work with OVER.
Does anyone have a solution for it?

TABLE FILE CAR
SUM SALES AS 'TOTAL, SALES' OVER
CAR AS 'CAR,TYPE'
END
-EXIT

Thanks,
Hari
WF-769

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


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
December 17, 2009, 03:05 PM
Francis Mariani
Not elegant, but here's one way, using only FOCUS code:

TABLE FILE CAR
SUM 
COMPUTE X1/A10 = 'TOTAL'; AS ''
SALES AS '' 
OVER
COMPUTE X2/A10 = 'SALES'; AS ''
COMPUTE X3/A1  = ''; AS '' 
OVER
COMPUTE X4/A10 = 'CAR'; AS ''
CAR AS '' 
OVER
COMPUTE X5/A10 = 'TYPE'; AS ''
COMPUTE X6/A1  = ''; AS '' 
END


Here's one way using CSS:

TABLE FILE CAR
SUM SALES AS 'TOTAL SALES'
OVER
CAR AS 'CAR TYPE'

ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=TITLE, COLUMN=P1, CLASS=W1, $
TYPE=TITLE, COLUMN=P2, CLASS=W1, $
ENDSTYLE

ON TABLE HOLD AS H001 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>Test</title>
<style type="text/css">
body
{
font-family: "Trebuchet MS", sans-serif;
font-size: 12px;
font-weight: normal;
}

TD { font-size: 12px; }

.W1 { width: 20px; }
</style>
</head>
<body>
!IBI.FIL.H001;
</body>
</html>
-HTMLFORM END
 



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 17, 2009, 03:22 PM
atturhari
Thanks Francis. That's what i wanted.
But, my output foramt is PDF with BORDERS ON.
I better stick with displaying column titles in single line.


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
December 17, 2009, 03:29 PM
Francis Mariani
This ought to work for PDF, but doesn't:

TABLE FILE CAR
SUM SALES AS 'TOTAL SALES'
OVER
CAR AS 'CAR TYPE'

ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=8, $
TYPE=TITLE, COLUMN=P1, WRAP=0.3, COLOR=RED, $
TYPE=TITLE, COLUMN=P2, WRAP=0.3, COLOR=BLUE, $
ENDSTYLE

ON TABLE PCHOLD FORMAT PDF
END
-RUN



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server