BookmarkSubscribeRSS Feed
radha009
Quartz | Level 8
I have excel report with column id (1 , 2, 3...). I want to add a hyperlink to the id.
In proc report
Compute id;
Urlstring = ( I didn’t get this how to use the url and where?
Call define ;
Call define;
End compute;

I have url like, http://www. Google .com/ test/?number=id

Thank you
3 REPLIES 3
radha009
Quartz | Level 8

my code :

 

ods excel file='c:\test\hidelink.xlsx';
proc report data=work.project
column request release_id href;
define request / display;
define release_id /display;
define href / computed;

compute href / character length=100;
href = catt('https://staff.contact.com/nav_to.do?uri=request.do?sysparm_query=number=',request);
call define('request','url',href);
endcomp;
run;
ods _all_ close;

 

the hyperlnk to the request is not displaying. when i click the request number it should go to the above link based on the reques number.

 

 

SASKiwi
PROC Star

As I understand it, to get a working hyperlink you need to wrap your URL in an Excel formula using the HYPERLINK function like so (example from above link):

      compute d1 ;
            IF d1='=HYPERLINK("[https://goo.gl/G4a0A9]", "https://www.cms.gov/Medicare/Quality-Initiatives-Patient-Assessment-Instruments/Value-Based-Programs...")' THEN DO;
               CALL define(_col_,'style','style=[textdecoration=underline foreground=blue]');
            END;

I suggest you get your formula working in Excel first manually then paste it into SAS.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 988 views
  • 0 likes
  • 2 in conversation