The SAS Output Delivery System and reporting techniques

Rotate text / headers using the Report Writing Interface

Reply
New Contributor
Posts: 2

Rotate text / headers using the Report Writing Interface

Hi all,

I'm using the report writing interface to output a table to pdf. Is there a way to rotate the headers so that the text is vertical? I don't need anything to span multiple columns or rows or anything, I just need the text rotated. 

I'm currently using: ods pdf

Report writing interface

9.3, Windows

Thanks,

Danni

SAS Super FREQ
Posts: 8,868

Re: Rotate text / headers using the Report Writing Interface

Hi:

  I do not know whether rotation is a style attribute that you can apply to text using the Report Writing Interface, that is a question to be answered by the doc or by Tech Support. However, even without the Report Writing Interface, you can produce vertical headers automatically with PROC PRINT (see #1) or for only some variable labels with PROC REPORT (see #2) or using ODS ESCAPECHAR for other procedures, like PROC FREQ (see #3).

Cynthia

options topmargin=.25in bottommargin=.25in;
ods pdf file='c:\temp\vertical_headers.pdf' style=printer startpage=no;
ods escapechar='^';
 
  proc print data=sashelp.class(obs=2) heading=v noobs label;
    title '1) PROC PRINT';
    var name age sex height weight;
    label name = 'Long Label for Name'
          height = 'How Tall Student Is';
  run;
  title;
   
  proc report data=sashelp.class(obs=2) nowd split='#';
    column name age sex height weight;
    define name / order 'L#o#n#g# #L#a#b#e#l# #f#o#r# #N#a#m#e';
    define height / 'H#o#w# #T#a#l#l# #S#t#u#d#e#n#t# #I#s';
    compute before _page_;
      line '2) PROC REPORT with SPLIT char';
    endcomp;
  run;

 

  ods pdf startpage=now;
  run;

     

  ** ^n is the original "newline" ESCAPECHAR instruction;
  ** alternate method is ^{newline 1}, which is more typing;
  proc freq data=sashelp.class;
    title '3) PROC FREQ Label with ODS ESCAPECHAR';
    table age;
    label age='T^nh^ne^n^_^nA^ng^ne^n';
  run;
ods pdf close;


compare_PRINT_REPORT_vertical_headers.pngvertical_headers_proc_freq.png
New Contributor
Posts: 2

Re: Rotate text / headers using the Report Writing Interface

Posted in reply to Cynthia_sas

Thank you!

It's not quite what I'm looking for, so I'll contact tech support, but it is good to know the other available options if there isn't an official style attribute for it.

Thanks again! Smiley Happy

Ask a Question
Discussion stats
  • 2 replies
  • 999 views
  • 0 likes
  • 2 in conversation