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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 848 views
  • 0 likes
  • 2 in conversation