Focal Point
Column width in FML

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

August 14, 2008, 12:04 PM
Bethany
Column width in FML
Does anyone know if you can set the column width in an FML report in the styling?


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
August 14, 2008, 01:33 PM
Francis Mariani
The answer is yes. Example code:

TABLE FILE CAR
SUM
SALES AS 'SALES,FOR THIS,YEAR'
RETAIL_COST AS 'RETAIL,COST'
DEALER_COST AS 'DEALER,COST'
FOR COUNTRY
'ENGLAND' LABEL R1 OVER
'FRANCE'  LABEL R2 OVER
RECAP SUBTOTAL1 = R1 + R2; AS 'ENGLAND+FRANCE' OVER
'ITALY'   LABEL R3 OVER
'W GERMANY' LABEL R4 OVER
RECAP SUBTOTAL2 = R3 + R4; AS 'ITALY+W GERMANY'
HEADING
"WEBFOCUS REPORT"
FOOTING
"THIS IS A FOOTING"
-*ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE = REPORT, FONT=ARIAL, SIZE=9, SQUEEZE=ON, $

TYPE=REPORT, COLUMN=SALES, WRAP=1, $
TYPE=REPORT, LABEL=SUBTOTAL1, STYLE=BOLD, COLOR=BLUE, $
TYPE=REPORT, LABEL=SUBTOTAL2, STYLE=BOLD, COLOR=GREEN, $
TYPE = DATA, BACKCOLOR=( RGB(243 244 248) RGB(255 255 255) ), $
ENDSTYLE
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
August 14, 2008, 02:07 PM
Bethany
Thanks Francis. Works with PDF output, but HTML still squeezes the columns. I need PDF output anyway.


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
August 14, 2008, 02:10 PM
Bethany
One other question, is there a way to set the width of the FOR field column?


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
August 14, 2008, 04:28 PM
Darin Lee
A couple comments - since you got what you need with PDF, I won't be lengthy.

HTML likes to squeeze everything, so you'll frequently see this. ON TABLE SET HTMLCSS ON may help in some cases. You also might try WIDTH= instead of WRAP=, the difference being that width will always be respected, while wrap will only be respected if there is at least one value that is as wide as your wrap column. Say you need a column 1 in wide. If the longest value is only .5 in then WRAP would give you a column .5 in wide, but WIDTH would stay at 1 in.

The width of the FOR column can be set the same way as the other columns. You can use column notation (TYPE=REPORT, COLUMN=N1) or specify the column name (TYPE=REPORT, COLUMN=COUNTRY)


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