BookmarkSubscribeRSS Feed
luci468
Calcite | Level 5

I am in the process of learning more sas ods functionality.

 

Everything seemed to be working fine but then something must have changed and the ods output is now consistently only landscape

I don't know if I'm missing something obvious but its driving me nuts that I cannot get any output in portrait - pdf or rtf.

At first I was outputting to PDF portrait then when I switched to RTF everything is now landscape including PDF.

 

Is there some other setting I'm missing?

I'm using SAS 9.4 TS Level 1M4 but I've also tried it on a SAS enterprise version.

When I open a new Word doc it is portrait.

I've tried placing multiple options orientation=portrait statements at various places in the code to no avail.

 

I cannot get it with the following stripped code:

 

ods _all_ close;
options orientation=portrait;
ods rtf file="E:\outputdir\BASIC.rtf" startpage=never;

 

proc odstext;
p " ";
p "Test ODS text to output portrait." /style=[font_face='Calibri' just=left fontsize=10pt];
run;

 

ods rtf close;

4 REPLIES 4
Reeza
Super User

1. What happens if you use a PROC PRINT in there as well?

2. Are you opening RTF in Word? How does the print preview show it, can you screenshot it? 

 

Reeza
Super User

Tested this on SAS 9.4 TS1M4 using SAS Studio via SAS UE. 

 

There were no issues. Note that the default setting is PORTRAIT, standard long pages. 

LANDSCAPE also works as designed.

 


@luci468 wrote:

I am in the process of learning more sas ods functionality.

 

Everything seemed to be working fine but then something must have changed and the ods output is now consistently only landscape

I don't know if I'm missing something obvious but its driving me nuts that I cannot get any output in portrait - pdf or rtf.

At first I was outputting to PDF portrait then when I switched to RTF everything is now landscape including PDF.

 

Is there some other setting I'm missing?

I'm using SAS 9.4 TS Level 1M4 but I've also tried it on a SAS enterprise version.

When I open a new Word doc it is portrait.

I've tried placing multiple options orientation=portrait statements at various places in the code to no avail.

 

I cannot get it with the following stripped code:

 

ods _all_ close;
options orientation=portrait;
ods rtf file="E:\outputdir\BASIC.rtf" startpage=never;

 

proc odstext;
p " ";
p "Test ODS text to output portrait." /style=[font_face='Calibri' just=left fontsize=10pt];
run;

 

ods rtf close;


 

ballardw
Super User

By any chance have you changed the Papersize option? That definition could have a width greater than height at appear as landscape.

 

You might want to run:

proc options option=papersize;run;

 

just to rule that possiblity out. If you see numbers and not a name such as "Letter" or "A4" then the first number is width and second is height.

 

And some RTF viewers may be using the active printer default paper type to display. So printer settings might affect appearance.

Cynthia_sas
SAS Super FREQ

Hi:

  I tried your code in SAS 9.4 both with and without a Proc Print and got Portrait orientation both times. I reduced the size on the Print Preview so you could see the output is portrait. Each screenshot has the log of the code that was run and you can see the file name in the Word Preview.

 

  If you can't figure out what is happening by investigating papersize, then I recommend working with Tech Support.

cynthia

 

 

With PP:

same_code_portrait.png

 

Without PP:

no_PP.png

 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 4 replies
  • 2003 views
  • 1 like
  • 4 in conversation