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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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