Desktop productivity for business analysts and programmers

How to change page set-up from Landscape to Portrait in RTF output

Reply
N/A
Posts: 0

How to change page set-up from Landscape to Portrait in RTF output

Does anyone know how I specify that RTF output is landscape rather than portrait ? Seems to always default to landscape.
Valued Guide
Posts: 2,111

Re: How to change page set-up from Landscape to Portrait in RTF output

Insert
OPTIONS ORIENTATION=LANDSCAPE;
at the beginning of the task. It takes effect the SECOND time you run the task. It doesn't work very well if you want to mix portrait and landscape in the same project.

If you want the entire project to be landscape, you can go to
Tools --> options --> Tasks; Insert Code
and insert the OPTIONS statement there.
SAS Employee
Posts: 2

Re: How to change page set-up from Landscape to Portrait in RTF output

Best way to do it is to turn off the EG-generated ODS code and write your own. First add the following custom code to the beginning of the task. To get to custom code in a task window select Preview Code -> Insert Code:

options orientation=landscape;
ods rtf file="c:\temp\myfile.rtf";

And then add the following custom code at the very end:

ods rtf close;
options orientation=portrait;

In the Properties of the task (In EG 4.1 right-click on the task in the project and select Properties, in EG 4.2, select Properties in the task dialog), select Results and deselect all output formats. The custom code will then create the RTF file and a link to the file will be included in the project.

This method will run correctly the first and every time and will not interfere with other tasks.
Ask a Question
Discussion stats
  • 2 replies
  • 156 views
  • 0 likes
  • 3 in conversation