Date: Wed, 21 Aug 2002 10:18:00 -0400
Reply-To: Steve Bloom <scbloom@MINDSPRING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Steve Bloom <scbloom@MINDSPRING.COM>
Subject: Re: Proc Report, ODS HTML, and Call Define, Repeated
Content-Type: text/plain; charset="iso-8859-1"
I've been trying to get PROC REPORT to have a unique hyperlink for each cell
within a table. The URL is dependent on the ROW and COLUMN, not the value of
the cell. I was needing this for a "drill-down" SAS/INTRNET application. I
could not figure out a solution not using PROC FORMAT. Any improvements
would be appreciated.
Steve Bloom
data html;
do x=1 to 100 by 3;
do y=1 to 10 by 2; xy=x*y;
output;
end;
end;
run;
PROC SORT; BY Y;
data cntlin; set html;
by y;
if first.y;
start + 1;
retain fmtname 'colfmt' type 'n';
label = put(y,z2.);
keep start fmtname type label;
run;
proc format library=library cntlin=cntlin;
run;
ods listing close;
ods html style=sasweb file='c:\temp\sas.html';
proc report data=html nowd;
column x y, xy;
define x/ group '';
define y/ across '';
define xy/ ANALYSIS sum '';
compute xy;
href = 'x' || put(_c1_,z3.) || 'y' || put(_col_-1,colfmt.) || '.html';
call define(_col_,"URL",href);
endcomp;
run;
ods html close;
ods listing;
____________________________________________________________________
eMail Privacy Protected by QuarantineMail (http://www.quarantinemail.com)
Licensed to: scbloom@mindspring.com
|