BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
hein68
Quartz | Level 8

I have the code below, which works to create the tables I want.  However, I want the first table to be in portrait orientation on the page, then the second table in landscape orientation, and then the last three tables back to portrait orientation.  This code isn't working to do that.  What do I need to do?

 

Thanks,

 

*FIRST TABLE;
options orientation=portrait;

proc tabulate data=top25wvars  ;
   class diag1ccs / order=freq;
   class age_3cat;
   table diag1ccs=' ',
         (all='All' age_3cat=' ') * n=' '
         /box='Top 25 CCS diagnoses'
   ;
 
run;
 
 
*SECOND TABLE;
ods RTF(ID=EGRTF) startpage=now;
options orientation=landscape;
*second part: gender, weekday vs weekend, discharge disposition;
*Now we want the adults only;
data adultstop25;
 set top25wvars;
 if age_3cat ^=2 then delete;
 format female gender.;
 format aweekend WEEKEND.;
run;
proc tabulate data=adultstop25;
   class diag1ccs / order=freq;
   class female aweekend dispuniform_4cat;
   table diag1ccs=' ',
         (all='Adults' female=' ' aweekend=' ' dispuniform_4cat=' ') * n=' '
         /box='Top 25 CCS diagnoses'
   ;
  
  
run;
 
 
*LAST THREE TABLES;

ods RTF(ID=EGRTF) startpage=now;
options orientation=portrait;
proc tabulate data=top25wvars;
   class diag1ccs / order=freq;
   class age_3cat timeofyear;
   table age_3cat, diag1ccs=' ',
         (timeofyear=' ') * n=' '
         /box='Top 25 CCS diagnoses'
   ;
  
run;
 
1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

The SAS OPTION orientation has no effect if you are using ODS. You need to add Orientation="Portrait" to your ODS statements:

ods RTF options(Orientation="Landscape");
ods RTF options(Orientation="Portrait");

View solution in original post

2 REPLIES 2
SASKiwi
PROC Star

The SAS OPTION orientation has no effect if you are using ODS. You need to add Orientation="Portrait" to your ODS statements:

ods RTF options(Orientation="Landscape");
ods RTF options(Orientation="Portrait");
hein68
Quartz | Level 8

Sorry, I hit accept this solution too soon.  

 

This is the code I am using, followed by the error message I am getting.  Any idea why?

 

Thanks.

 

ods graphics on;
56         ods RTF options (ID=EGRTF Orientation="Portrait");
                   _______           ___________
                   22                79
                   202               202
ERROR 22-322: Syntax error, expecting one of the following: ;, (, ANCHOR,
              AUTHOR, BASE, BODY, BOOKMARK, BOX_SIZING, CHARSET, CLOSE,
              COLUMNS, CONTENTS, CSSSTYLE, DATAPANEL, DOM, DPI, ENCODING,
              EXCLUDE, FILE, FONTSCALE, GFOOTNOTE, GTITLE, HOST, IMAGE_DPI,
              KEEPN, LSTPIPE, NEWFILE, NOCONTENTS, NOGFOOTNOTE, NOGTITLE,
              NOKEEPN, NOLSTPIPE, NOOUTLINE, NOTRKEEP, OPERATOR, OUTLINE,
              PACKAGE, PATH, RECORD_SEPARATOR, SAS, SASDATE, SELECT, SGE, SHOW,
              STARTPAGE, STYLE, TEXT, TITLE, TRANTAB, TRKEEP. 
ERROR 79-322: Expecting a ).
ERROR 202-322: The option or parameter is not recognized and will be ignored.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 909 views
  • 0 likes
  • 2 in conversation