BookmarkSubscribeRSS Feed
NASEER
Calcite | Level 5
Dear team
I need your help to Assign hyperlink on variable name not on values....for example

Please take sashelp.Class data set and generate the report using proc report and give hyperlink on NAME and Sex variables while generating report
4 REPLIES 4
Kurt_Bremser
Super User

A variable name can consist of a maximum of 32 characters, and valid SAS names cannot consist of the characters necessary for URLs.

You might be able to fit a URL in a variable label.

 

What are you trying to achieve?

NASEER
Calcite | Level 5
I want to generate the report using proc report.
while creating report I want Assign hyperlink on variable names.for example Please take sashelp.Class data set and generate the report using proc report and give hyperlink on NAME and Sex variables while generating report
ed_sas_member
Meteorite | Level 14

Hi @NASEER 

 

You can specify the hyperlink in a style option in the DEFINE statement as below:

proc report data=sashelp.class;
	column name;
	define name / display style(header)={url='https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Assign-hyperlink-on-variable-names/m-p/641104'};
run;

Best,

Tom
Super User Tom
Super User

Where to you want the link? On the column header? On on the value of the variable?

If on the vlaue of the variable does the link depend on the value of the variable?

 

If the latter you probably need to create a format that converts the value into the link and use the STYLE option to set the url to the formatted value.  Although with PROC REPORT you can also use a compute block.  See this earlier answer.  https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-Clickable-external-hyperlink/td-p/49...

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
  • 4 replies
  • 1496 views
  • 6 likes
  • 4 in conversation