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