Desktop productivity for business analysts and programmers

SPANROWS option in proc report does not display properly in SAS Report window

Reply
Contributor RVA
Contributor
Posts: 21

SPANROWS option in proc report does not display properly in SAS Report window

I am currently on SAS EG 7.1 (SAS Base 9.4).  In my SAS EG configuration, I have two output windows: SAS Report and HTML.  I wanted to use the SPANROWS option in proc report, but the table did not display properly in SAS Report window.  It, however, did display well in the HTML window.  Below are the codes that I used.  You can copy and run it on your SAS EG.  (These codes were copied from http://blogs.sas.com/content/sastraining/2011/02/28/whats-so-great-about-spanrows/)  Can anyone tell me what was wrong with the SAS Report window?  Thank you.

proc sort data=sashelp.shoes out=shoes;

  where (product contains 'Casual') and (region = 'Canada' or region='Pacific');

  by region product;

run;

proc report data=shoes nowd;

title 'REPORT Default Behavior';

  column region subsidiary product,(sales sales=savg);

  define region / group style(column)=Header;

  define subsidiary / group style(column)=Header;

  define product / across 'Product Sales';

  define sales / sum 'Sum' f=dollar10.;

  define savg / mean 'Mean' f=dollar10.;

  rbreak after / summarize style=Header;

run;

proc report data=shoes nowd SPANROWS;

title 'REPORT Output with SPANROWS';

  column region subsidiary product,(sales sales=savg);

  define region / group style(column)=Header;

  define subsidiary / group style(column)=Header;

  define product / across 'Product Sales';

  define sales / sum 'Sum' f=dollar10.;

  define savg / mean 'Mean' f=dollar10.;

  rbreak after / summarize style=Header;

run;

Super User
Super User
Posts: 7,720

Re: SPANROWS option in proc report does not display properly in SAS Report window

Thats just because the basic report window is a simple text displayer.  It doesn't have the functionality to render more advanced text manipulations.  Personally the first thing I do when I start SAS is turn that off and send all output to a file, RTF or PDF, so I can see the rendering as well.

SAS Super FREQ
Posts: 8,819

Re: SPANROWS option in proc report does not display properly in SAS Report window

Hi:

  It looks like SASReport XML format in EG does not support the SPANROWS option. It works in HTML, RTF, PDF (Printer family) destinations. SASReport XML has to be usable in many other client applications, not just Enterprise Guide (client apps like Web Report Studio and/or the Information Delivery Portal). So it doesn't surprise me that SASReport XML doesn't use SPANROWS. As RW9 suggested, you can switch to another destination if you really need/want to use SPANROWS.

cynthia

Ask a Question
Discussion stats
  • 2 replies
  • 546 views
  • 6 likes
  • 3 in conversation