BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Does anyone know how I specify that RTF output is landscape rather than portrait ? Seems to always default to landscape.
2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12
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.
StaceySyphus
SAS Employee
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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2516 views
  • 0 likes
  • 3 in conversation