Focal Point
Fixing Column Width.

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

April 14, 2008, 03:10 AM
focuzsambit
Fixing Column Width.
How to fix the column width to inches...
I tried width,wrap and squeeze...but found that all are related to data-length...
any pointers to the same ??

tks/sam


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
April 14, 2008, 08:55 AM
mgrackin
WIDTH, WRAP and SQUEEZE are the correct commands to use. If you are using the HTML output format you need to add the following statement to your code:

ON TABLE SET HTMLCSS ON

If you are using the PDF output format, read the articles I wrote about PDF and HTML output report design at the following URL under the "Formatting Reports" section.

http://www.informationbuilders.com/support/developers/index.html


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
April 15, 2008, 03:43 AM
focuzsambit
ON TABLE SET HTMLCSS ON is in place...
it's still getting deformatted based on the data of that field....


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
April 15, 2008, 05:41 AM
GamP
If I run the following code, this will demonstrate exactly what Sam is experiencing:
TABLE FILE CAR
BY COUNTRY
BY CAR
BY BODYTYPE
BY MODEL
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=ON,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=REPORT,
     COLUMN=N3,
     SQUEEZE=0.277778,
$
TYPE=REPORT,
     COLUMN=N4,
     WRAP=1.000000,
$
ENDSTYLE
END

The column BODYTYPE should be truncated at 0.3 inches. It is not. It just displays the entire data in the field.
Most probably this is because there is no word-separator in the field on which to truncate or wrap. By the way: for html it does not matter if I specify Squeeze or Wrap, the outcome is the same.

Wrapping and/or squeezing works ok when output is pdf, also the specified column widths are respected with pdf. But not with html.....


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
April 15, 2008, 09:04 AM
mgrackin
The issue you are running into is because PDF and HTML are two very different animals. The rules are different for each output format.

PDF output is created completely by WebFOCUS and therefore WebFOCUS is able to truncate or wrap the data appropriately. As you see in the PDF output, it is possible to break words into smaller parts in order to wrap the text.

HTML output is created by WebFOCUS but it is rendered and displayed by the browser. Therefore the rules are diffecrent. There is no such thing as truncating in HTML. Further, the rules for wrapping text are different with HTML. I have never seen HTML break words into smaller parts in order to wrap the text.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011