Problem Note 39425: Blank GROUP or ORDER rows might contain links created from a CALL DEFINE with the URL attribute
When using a CALL DEFINE with PROC REPORT to apply a URL to a GROUP or ORDER variable, the URL link is applied to every row in the column in SAS® 9.2. In SAS® 9.1, the URL only applied to the GROUP or ORDER variable value. This applies only to ODS destinations.
To apply the link only to the GROUP or ORDER variable value, do one of the following:
- Add the SPANROWS option to the PROC REPORT statement.
- Use a subsetting IF statement to determine if the cell for the row contains a value and then apply the link with a CALL DEFINE and the URL attribute.
Please see the code in the Full Code tab for an example.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft® Windows® for x64 | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.2 TS1M0 | 9.3 TS1M0 |
Windows Vista | 9.2 TS1M0 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.2 TS1M0 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.2 TS1M0 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.2 TS1M0 | 9.3 TS1M0 |
HP-UX IPF | 9.2 TS1M0 | 9.3 TS1M0 |
Linux | 9.2 TS1M0 | 9.3 TS1M0 |
Linux for x64 | 9.2 TS1M0 | 9.3 TS1M0 |
OpenVMS on HP Integrity | 9.2 TS1M0 | 9.3 TS1M0 |
Solaris for x64 | 9.2 TS1M0 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Below is code that will produce the problem and illustrate both of the suggested circumventions.
In SAS 9.1, a link is created to the cell with a value within the column. In SAS 9.2, a link is created for every cell in the column.
ods html;
proc report data=sashelp.class nowd split='*';
columns sex name age;
define sex /group;
define name /display;
define age /display;
compute sex /char length=55;
href=sex||'.html';
call define(_col_,"URL",href);
endcomp;
run;
ods html close;
/*** SPANROWS workaround ***/
/* Modify the C:\ path to a directory that you have write access to. */
ods pdf file='c:\myfile.pdf' ;
proc report data=sashelp.class nowd split='*' spanrows;
columns sex name age;
define sex /group;
define name /display;
define age /display;
compute sex /char length=55;
href=sex||'.pdf';
call define(_col_,"URL",href);
endcomp;
run;
ods pdf close;
/*** Subsetting IF statement workaround ***/
ods html;
proc report data=sashelp.class nowd split='*';
columns sex name age;
define sex /group;
define name /display;
define age /display;
compute sex;
if sex ne ' ' then do;
href=sex||'.html';
call define(_col_,"URL",href);
end;
endcomp;
run;
ods html close;
Blank GROUP or ORDER rows might contain links created from a CALL DEFINE with the URL attribute. This applies only to ODS destinations.
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> Procedures ==> REPORT
|
Date Modified: | 2010-05-05 08:40:20 |
Date Created: | 2010-04-22 17:10:22 |