I am interested in using the value of an ACROSS variable in the URL of my Call Define statement in my compute statement.
In the example below, I'm wondering if Proc Report gives me a way to access the value of each TYPES variable as the columns are being built, so that I can include it in the URL link? Can I access the value from a compute statement using the N variable?
Thanks for the help.
options missing="";
data REPORT;
input VARIABLE $ TYPES $;
datalines;
VAR1 TYPE1
VAR1 TYPE2
VAR1 TYPE3
VAR1 TYPE5
;
PROC FORMAT ;
VALUE $TYPE
'TYPE1'='Type 1'
'TYPE2'='Type 2'
'TYPE3'='Type 3'
'TYPE4'='Type 4'
'TYPE5'='Type 5';
Run ;
proc report data=REPORT nowd;
column ("Variables" variable) ("TYPES" types,n);
define variable / '';
define types / across '' format=$type. preloadfmt;
define n / '' format=comma12.;
compute types;
If _c2_>0 then
call define("_c2_","style","style={url = '<MY URL>' }");
endcomp;
run;
... View more