Focal Point
[SOLVED] Limit width of acrosscolumn title - How?

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

February 12, 2009, 05:15 AM
GamP
[SOLVED] Limit width of acrosscolumn title - How?
Here's another one.
-DEFAULT &WFFMT        = 'PDF'

DEFINE FILE CAR
MODBOD/A40 = MODEL || (' ' | BODYTYPE);
END
TABLE FILE CAR
PRINT SEATS
BY COUNTRY
ACROSS MODBOD AS ''
IF COUNTRY EQ 'ITALY' OR 'ENGLAND'
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,$
TYPE=REPORT, FONT='VERDANA', SIZE=8,$
TYPE=ACROSSVALUE, WRAP=2.00, WIDTH=2.00,$
TYPE=ACROSSTITLE, WRAP=2.00, WIDTH=2.00,$
ENDSTYLE
END

If I run this code in HTML, the column headers get wrapped over several lines.
But in PDF I seem to be unable to have the values in the acrosstitle wrapped. They show on one line, no matter what I do.
Any idea(s)?

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


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
February 12, 2009, 11:30 AM
Francis Mariani
Dare I say this is a bug, and it has been around for a very long time?

I tried using the GUI in Dev Studio to create a simple report with an ACROSS. You can double-click the ACROSS field, select "Active Object" as "Column Title And Data" then change "Column Layout" to "Wrap" with "Limit to" 1.00 inches. It generates some code that does not work - the wrap is not applied, and I think the generated code is no good:

TYPE=REPORT,
     COLUMN=N0,
     WRAP=1.250000,
$
TYPE=REPORT,
     COLUMN=N1,
     WRAP=1.000000,
$


Column N0 is my ACROSS field, column N1 is my PRINT field.
I think I'll open a case.


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
February 12, 2009, 01:25 PM
j.gross
Divide and conquer:

-DEFAULT &WFFMT        = 'PDF'
-SET &H=IF &WFFMT NE 'PDF' THEN ' ' ELSE '-*';
-SET &P=IF &WFFMT EQ 'PDF' THEN ' ' ELSE '-*';

DEFINE FILE CAR
 MODBOD/A40 = MODEL || (' ' | BODYTYPE);
 PARAG/A40 = PARAG(40, MODBOD, '\', 20, 'A40');
 PART1/A20 = GETTOK(PARAG, 40, 1, '\', 20, 'A20');
 PART2/A20 = GETTOK(PARAG, 40, 2, '\', 20, 'A20');
END
TABLE FILE CAR
PRINT SEATS
BY COUNTRY
-* for HTML:
&H.EVAL ACROSS MODBOD AS ''
-* for PDF:
&P.EVAL ACROSS MODBOD NOPRINT
&P.EVAL ACROSS PART1 AS ''
&P.EVAL ACROSS PART2 AS ''

IF COUNTRY EQ 'ITALY' OR 'ENGLAND'
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,$
TYPE=REPORT, FONT='VERDANA', SIZE=8,$
ENDSTYLE
END




- Jack Gross
WF through 8.1.05
February 13, 2009, 02:36 AM
GamP
Francis, That's exactly what I also found.

Jack - Smart! I'll try to use your approach in my situation, it seems very doable.

Thanks for your thoughts!


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
February 13, 2009, 05:26 AM
j.gross
Welcome, Gerard. (and Shrikant too)