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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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