BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Niugg2010
Obsidian | Level 7

 

I want to get rtf output. The first page has orientation=landscape, and the second page has orientation=portrait;

The below is my code. Why it does not work?

 

 

options orientation=landscape obs=5;
ods rtf file="C:\XXXXX\Desktop\111.rtf";
proc print data=sashelp.class;
run;


options orientation=portrait;
proc print data=sashelp.retail; run;
ods rtf close;

 

 

Another question is if I only use orientation=portrait, which option can put these two proc output in one page, not like above the outputs are on different pages? Thanks.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Shmuel
Garnet | Level 18

What do you mean by it does not work?

Are both landscape ? Are both portrait ? Is there a syntax error?

Next time post your log.

 

Meanwhile try next code (I haven't tested it):

 

options orientation=landscape obs=5;
ods rtf file="C:\XXXXX\Desktop\111.rtf";
proc print data=sashelp.class;
run;


ODS options orientation=portrait;
proc print data=sashelp.retail; run;
ods rtf close;

View solution in original post

2 REPLIES 2
Shmuel
Garnet | Level 18

What do you mean by it does not work?

Are both landscape ? Are both portrait ? Is there a syntax error?

Next time post your log.

 

Meanwhile try next code (I haven't tested it):

 

options orientation=landscape obs=5;
ods rtf file="C:\XXXXX\Desktop\111.rtf";
proc print data=sashelp.class;
run;


ODS options orientation=portrait;
proc print data=sashelp.retail; run;
ods rtf close;
Cynthia_sas
SAS Super FREQ
Hi:
This Tech Support note shows the exact syntax you need to use to do what you want to do. My default every procedure step will start a new page.
http://support.sas.com/kb/24/559.html

cynthia

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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