Focal Point
Format EXL2K - How do I make it landscape?

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

July 03, 2007, 10:55 AM
Jennifer B.
Format EXL2K - How do I make it landscape?
I'm trying to force this report to go into landscape mode in Excel. When I run this code it stays in portrait. Any ideas? Thanks in advance!

ON TABLE SET ONLINE-FMT EXL2K
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.350000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.100000,
BOTTOMMARGIN=0.350000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
July 03, 2007, 11:16 AM
Prarie
Jennifer,

Squeeze On is part of your problem. But if you will search this Forum using the Find Search tab...you will find many discussions on this topic and things to try for your application.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Jennifer,

As far as I know, Orientation is ignored for Excel unless you use Excel Templates (which I'm just learning how to use). You cannot set any of the "Page Setup" features.

Marie


WebFOCUS 7.1.6 on Win 2K SP2 - Self Service, Informix SQL Passthru
Marie is absolutely correct, in fact the only output format that you see the page orientation respected is PDF so for Excel you will have to rely upon VBA code.

This is some code that you would need to change orientation and page size -
    With ActiveSheet.PageSetup
        .Orientation = xlLandscape
        .PaperSize = xlPaperA3
    End With


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
Tony, I am very curious as to where this code would be applied.

Cheers.


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
Francis look at the posting
WebFocus 7.1 and Excel Templates it contains the full script that tony is indicating

Unfortunately you're 53 so if you want to do it you will need to look at the article I posted quite a while ago
Creating Excel macros
Thanks, JG.


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