The SAS Output Delivery System and reporting techniques

Across variable not passed in hyperlink

Reply
Frequent Contributor
Posts: 115

Across variable not passed in hyperlink

Hello all,
I am trying to use proc report to create a grid of counts. Each count is a link to another report for the corresponding grid elements.

Problem is the across variable is not passed in the hyperlink.
Below is what I am using.
proc report data=repo.No_Activity_018;
columns Inactive_Days_Bin person_id ,Plan N;
define Inactive_Days_Bin/ group 'Inactive Days Bin';
define Plan/across 'Plan';
define person_id/analysis N '';

compute person_id;
urlstring="do?_program=&stpname" || '&plan='||plan||'&bin='||Inactive_Days_Bin;
call define(_col_, 'URL', urlstring);
endcomp;
run;

Plan is the across variable.. But does not seem to be passed to the hyperlink.
SAS Super FREQ
Posts: 8,743

Re: Across variable not passed in hyperlink

Hi:
When PROC REPORT builds a report, it does not have visibility of the VALUES of the ACROSS variable (such as your values for PLAN). PROC REPORT is happiest building URLs when it can use ROW (GROUP or ORDER) values. You can, however, build hyperlinks, but you would have to do it conditionally...using absolute column names in a COMPUTE block:
[pre]
compute person_id;
urlstring3="do?_program=&stpname" || '&plan=Asia'||'&bin='||Inactive_Days_Bin;
call define('_c3_','URL',urlstring3);
urlstring4="do?_program=&stpname" || '&plan=Canada'||'&bin='||Inactive_Days_Bin;
call define('_c4_','URL',urlstring4);
endcomp;
[/pre]

This would work because you would know whether _c3_ absolute column was the Asia column or whether _c4_ was the Canada column.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 118 views
  • 0 likes
  • 2 in conversation