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;
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?
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;
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.
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:
Without PP:
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.