Did you know that you can change the orientation of
printed SAS reports between portrait
and landscape?
This can be done by specifying either PORTRAIT (the default) or LANDSCAPE as the value
of the ORIENTATION option.
Here is an example of creating a report in a PDF file
with the ORIENTATION option specified as landscape and then as portrait:
ods _all_
close;
ods noresults;
title2 'Switching
PDF orientation on the fly';
ods pdf
notoc file="%sysfunc(pathname(WORK))\ChangeOrientation.pdf";
title3 'Females
in Landscape';
options orientation=landscape;
proc print data=sashelp.class;
where sex = 'F';
run;
title3 'Males
in Portrait';
options orientation=portrait;
proc print data=sashelp.class;
where sex = 'M';
run;
ods pdf
close;
---MMMMIIIIKKKKEEEE
(aka Michael A. Raithel)
Author of the new cult classic for computer programmers: It Only Hurts When I Hit <ENTER>
Print edition: http://tinyurl.com/z8bzx2e
Kindle edition: http://tinyurl.com/zypgqa7
The hack above is an excerpt from the book: Did You Know That? Essential Hacks for Clever SAS Programmers
Print edition: http://tinyurl.com/z8bzx2e
Kindle edition: http://tinyurl.com/zypgqa7
No comments:
Post a Comment