Hello
I am making a report, where it is necessary for the document to be both in landscape and portrait.
Is it possible in the document to do something like say: Page 1-5 should be portrait and the rest should be landscape? If yes, then how would it be done?
When making the tables in proc report I fliter the work.file with the "where" function, so, as far as I am aware, I cannot just use the proc print function.
The destination is rtf.
All help will be greatly appreciated.
Best Regards
Bruce
Ah yes, you need to add in ods rtf; after the orientation change. Also make sure to specify a style= in your procs e.g:
ODS rtf File = "s:\temp\rob\Name.rtf";
ods listing close;
ods noresults;
ods output close;
options orientation=portrait;
ods rtf;
proc report data=sashelp.class nowd style=your_style_here;
run;
options orientation=landscape;
ods rtf;
proc report data=sashelp.class nowd style=your_style_here;
run;
ods rtf close;
Should just be a matter of putting the ods orientation= statement between your procs.
ods rtf file="...";
ods orientation=landscape;
proc print...
ods orientation=portrait;
proc..
...
Hello
I tried the "ods orientation" but for some reason it does not work. In the log it says that the statement is used out of order.
Currently I have the following code for the orientation and file:
OPTIONS ORIENTATION=PORTRAIT NODATE ;
ODS OUTPUT CLOSE;
ODS LISTING CLOSE;
ODS RTF File = "Name.rtf "
I tried copying the above between the proc reports statements, but it doesn't work, even though Sas does not state an error i the log.
Do you have any suggestions to my problem?
Best Regards
Bruce
Ah yes, you need to add in ods rtf; after the orientation change. Also make sure to specify a style= in your procs e.g:
ODS rtf File = "s:\temp\rob\Name.rtf";
ods listing close;
ods noresults;
ods output close;
options orientation=portrait;
ods rtf;
proc report data=sashelp.class nowd style=your_style_here;
run;
options orientation=landscape;
ods rtf;
proc report data=sashelp.class nowd style=your_style_here;
run;
ods rtf close;
Hey
Thanks for your help. That solved it
Have a nice day
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.