The SAS Output Delivery System and reporting techniques

ORIENTATION=PORTRAIT not working in ODS, keep getting landscape

Reply
Occasional Learner
Posts: 1

ORIENTATION=PORTRAIT not working in ODS, keep getting landscape

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;

Super User
Posts: 17,784

Re: ORIENTATION=PORTRAIT not working in ODS, keep getting landscape

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? 

 

Super User
Posts: 17,784

Re: ORIENTATION=PORTRAIT not working in ODS, keep getting landscape

[ Edited ]

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;


 

Super User
Posts: 10,487

Re: ORIENTATION=PORTRAIT not working in ODS, keep getting landscape

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.

SAS Super FREQ
Posts: 8,743

Re: ORIENTATION=PORTRAIT not working in ODS, keep getting landscape

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

 

 

Ask a Question
Discussion stats
  • 4 replies
  • 414 views
  • 1 like
  • 4 in conversation