Is it possible to use both landscape and portrait in a proc report document?

Accepted Solution Solved
Reply
Contributor
Posts: 47
Accepted Solution

Is it possible to use both landscape and portrait in a proc report document?

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


Accepted Solutions
Solution
‎06-19-2014 06:54 AM
Super User
Super User
Posts: 7,407

Re: Is it possible to use both landscape and portrait in a proc report document?

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;

View solution in original post


All Replies
Super User
Super User
Posts: 7,407

Re: Is it possible to use both landscape and portrait in a proc report document?

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..

...

Contributor
Posts: 47

Re: Is it possible to use both landscape and portrait in a proc report document?

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

Solution
‎06-19-2014 06:54 AM
Super User
Super User
Posts: 7,407

Re: Is it possible to use both landscape and portrait in a proc report document?

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;

Contributor
Posts: 47

Re: Is it possible to use both landscape and portrait in a proc report document?

Hey

Thanks for your help. That solved it Smiley Happy

Have a nice day

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 539 views
  • 0 likes
  • 2 in conversation