Focal Point
[SOLVED]Column width ACROSSCOLUMNS and BY-COLUMNS

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

March 03, 2009, 05:46 AM
TonyB
[SOLVED]Column width ACROSSCOLUMNS and BY-COLUMNS
Hello,

The following code is adapted from an earlier post on this subject:

DEFINE FILE CAR
C/A1 = EDIT (CAR,'9$$$$$$$$$$$$$$$');
END
TABLE FILE CAR
SUM
CNT.SEATS AS ''
BY COUNTRY
ACROSS C AS ''
WHERE RECORDLIMIT EQ 10
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,SQUEEZE=ON,SIZE=7,WRAP=0.20,$
TYPE=ACROSSVALUE,JUSTIFY=RIGHT,WRAP=0.20,$
TYPE=REPORT,ACROSSCOLUMN=C,JUSTIFY=RIGHT,$
ENDSTYLE
END


PROBLEM:
I would like the width of acrosscolumns to be small, but the width of the by-column to be wide (so the text will fit and not wrapped). In my dataset the number of across-values can be great.
I’ve read many posts in your forum, and also the 2 articles op MGRACKIN on HTML and PDF Report Design, but I can't find a solution.

Can someone help..

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


WebFocus 8.0.3
Windows 7 Prof
Oracle 11.2.0.3
Output PDF and Excel
March 03, 2009, 05:58 AM
GamP
 TYPE=REPORT,GRID=OFF,SQUEEZE=ON,SIZE=7,$
TYPE=ACROSSVALUE,JUSTIFY=RIGHT,WRAP=0.20,$
TYPE=DATA, COLUMN=COUNTRY, JUSTIFY=LEFT,WIDTH=4.0,$
TYPE=REPORT,ACROSSCOLUMN=C,JUSTIFY=RIGHT,$
 

Will this do it for you?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 03, 2009, 07:24 AM
TonyB
Gamp,

thank you for your response.

Your solution takes care of de width of the BY-COLUMN, but the wrapping of the acrossvalues doesn't work any more.
You can see this when you make C larger (from A1 to A5):

DEFINE FILE CAR
C/A5 = EDIT (CAR,'99999$$$$$$$$$$$');
END
TABLE FILE CAR
SUM
CNT.SEATS AS ''
BY COUNTRY
ACROSS C AS ''
WHERE RECORDLIMIT EQ 10
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,SQUEEZE=ON,SIZE=7,$
TYPE=ACROSSVALUE,JUSTIFY=RIGHT,WRAP=0.20,$
TYPE=DATA, COLUMN=COUNTRY, JUSTIFY=LEFT,WIDTH=4.0,$
TYPE=REPORT,ACROSSCOLUMN=C,JUSTIFY=RIGHT,$
ENDSTYLE
END

The justifying also doesn't work anymore.

Tony


WebFocus 8.0.3
Windows 7 Prof
Oracle 11.2.0.3
Output PDF and Excel
March 03, 2009, 08:27 AM
mgrackin
1) The keyword WIDTH should be replaced with the word WRAP. WIDTH is used to control the width of items in HEADINGs, SUBHEADs, FOOTINGs, etc.

2) When controling the width of a column do it via a TYPE=REPORT, WRAP=n.nn, ... statement. Using WRAP=n.nn on a TYPE=DATA statement does not work.

3) WRAP does not work for ACROSSVALUEs.

Here's an adjusted sample of code that I hope helps to explain this.

DEFINE FILE CAR
C/A5 = EDIT (CAR,'99999$$$$$$$$$$$');
END
TABLE FILE CAR
SUM
CNT.SEATS AS ''
BY COUNTRY
ACROSS C AS ''
WHERE RECORDLIMIT EQ 10
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,SQUEEZE=ON,SIZE=7,$
TYPE=REPORT,WRAP=0.60,$
TYPE=REPORT,COLUMN=COUNTRY,WRAP=1.0,$
TYPE=ACROSSVALUE,JUSTIFY=RIGHT,$
TYPE=DATA,JUSTIFY=RIGHT,$
TYPE=DATA,COLUMN=COUNTRY,JUSTIFY=LEFT,$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
March 03, 2009, 09:34 AM
TonyB
Thanks Mickey,

your answer is not what I expected, but by playing with your settings, I succeeded in what I wanted.


Therefore I consider my problem SOLVED


WebFocus 8.0.3
Windows 7 Prof
Oracle 11.2.0.3
Output PDF and Excel