The SAS Output Delivery System and reporting techniques

Multiple Links proc Report

Reply
Regular Contributor
Posts: 235

Multiple Links proc Report

proc report data=LotWafer_Matrix nowd style(report) = [rules=groups cellspacing=0pt cellpadding=2pt];
columns LOT_ID ChildNr BlockSeq OperationSeq OperSeq OpersAway Block Operation
W01 W02 W03 W04 W05 W06 W07 W08 W09 W10 W11 W12 W13 W14 W15 W16 W17 W18 W19 W20 W21 W22 W23 W24 W25
oWaferMap oWafersToBeProcessed MainStepService;

compute W02;
url_SP = "http://wiksas.imec.be:8080/SASStoredProcess/do?_program=%2FFAB%2Fedoc_lot_attach";
url_stp = compress(url_SP) || "&sel_lotID=" || compress("&sel_lot") || "&Wafer=" || compress(W02) || '" title="View Data" target="_blank';
CALL DEFINE(_COL_, 'URL', url_stp );
if substr(W02,1,1) eq 'D' then call define (_col_,"STYLE","style={BACKGROUND=#99FF33 FONT_WEIGHT=BOLD}");
endcomp;
run;

now i have defined a link to attach, i want an other link, to view..
and i want it in the same cell

possible or not?
SAS Super FREQ
Posts: 8,864

Re: Multiple Links proc Report

Hi:
Yes, it is possible to get 2 hyperlinks in one cell. If you run the code below (not as a stored process), you will see that clicking the NAME value takes you to www.sas.com and clicking the age value takes you to www.setgame.com.

But your CALL DEFINE statement is setting a single URL for the ENTIRE value of the W02 column. You cannot use CALL DEFINE to set 2 different URLs in 1 column. But, you can set 2 URLs -- just not with CALL DEFINE. I used simple URLs and if you have issues with the URLs working in the context of a stored process, I'd recommend working with Tech Support.

cynthia

[pre]
ods html file='c:\temp\test2url.html' style=sasweb;

title 'Test 2 URLs';
proc report data=sashelp.class nowd
style(column)={protectspecialchars=off};
where age = 13;
column name age dispinfo height weight;
define name / display noprint;
define age / display noprint;
define dispinfo / computed;
define height /sum;
define weight / sum;
compute dispinfo / character length=400;
url1 = '<a href="http://www.sas.com">';
url2 = '<a href="http://www.setgame.com">';
dispinfo = catt('<div>',url1,name,'</a></div>&nbsp;<br/><div>',url2,put(age,2.0),'</a></div>');
endcomp;
run;
ods html close;
[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 168 views
  • 0 likes
  • 2 in conversation