The SAS Output Delivery System and reporting techniques

How to print columns vertically using SAS Proc Report and ODS?

Reply
Frequent Contributor
Posts: 82

How to print columns vertically using SAS Proc Report and ODS?

I have not been succesful at figuring out how to print column headers & column values out vertically on a SAS report using Proc Report. I have been researching on this all day.     I do not see any options to allow this.  Can someone give me some direction on how I can accomplish this. 

 

Thanks for any direction/guidance you could give me!

 

 

Grand Advisor
Posts: 10,211

Re: How to print columns vertically using SAS Proc Report and ODS?

Which ODS destination do you want to use?

And what type of "vertical" do you want? Reads top to bottom, bottom to top, letters with normal orientation or rotated (on their side or upside down)

Is this only for column headers or elsewhere in the table?

And which version of SAS are you using?

Frequent Contributor
Posts: 82

Re: How to print columns vertically using SAS Proc Report and ODS?

Thank you for your reply, I hope this information explains it better.

 

Which ODS destination do you want to use?  _ODSDEST=TAGSETS.EXCELXP

 

SAS Version:  9.2

 

And what type of "vertical" do you want? Reads top to bottom, bottom to top, letters with normal orientation or rotated (on their side or upside down)

Is this only for column headers or elsewhere in the table?

 

I want the column headers and column values vertical, example:

ColumnHeader     ColumnValue

AccountNbr             3301

RecvdToDate          10050.00

PeriodYear              2014

OtherData                xyz

 

AccountNbr             3302

RecvdToDate          567810.00

PeriodYear              2015

OtherData                abc

 

Note: This is a small representation of the columns. The data for each ‘AccountNbr’ will be summarized by year and the user wants the output to be printed (as excel) in the above format. For each AccountNbr, the columns will be repeated and will be printed (vertically).

Grand Advisor
Posts: 9,578

Re: How to print columns vertically using SAS Proc Report and ODS?

ods tagsets.msoffice2k_x file="c:\temp\rotate.xls" style=normal
      options( rotate_headers="45"
               height="60"  );


  proc print data=sashelp.prdsale;
  title "Rotate header";
  run;

  ods tagsets.msoffice2k_x close;

http://support.sas.com/rnd/base/ods/odsmarkup/msoffice2k/index.html

 

Ask a Question
Discussion stats
  • 3 replies
  • 410 views
  • 0 likes
  • 3 in conversation