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;
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.
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: