Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Hyperlinks in Report Designer

Reply
New Contributor
Posts: 4

Hyperlinks in Report Designer

Hi, I am new to SAS VA, using v7.1

I am trying to create a report with a hyperlink against each row of data, so that when the hyperlink is clicked it will take the user to a particular web page.

I presume the best way to do this is to right mouse on my column, for example 'Product Name', then select Add Link, External Link. However, I need to add some logic to say something like,

if the 'Product Name' = 'A', then the external hyperlink is https://productA,

if the 'Product Name' = 'B', then the external hyperlink is https://productB,

etc

Do I need to add a 'Link to Stored Process'? If so, how and where do I create a Stored Process?

Or is there a better way to do this?

Thanks.

SAS Employee
Posts: 38

Re: Hyperlinks in Report Designer

Ashley,

You are on the right track. When you create an external link, you can include a data driven portion, but the initial part of the URL must by static.  The entire URL can not be data driven in the current and prior releases.  If you have a portion of the URL that is consistent, you can type that in and pass the dynamic portion by choosing a data item from the parameter drop-down list in the Create External Link window. Note that this data item can be a calculated data item that you create in the report. The target for the parameter portion of the parameter is optional, and I suspect you would leave that blank in your case.

You'll need to create a calculated data item from the data tab in the left panel that includes your IF THEN ELSE logic. I'm assuming you have more than two products, so you would need to nest IF THEN ELSE statements if you use this approach. If you have many products, you might want to consider storing the dynamic portion of the URL for the product in the source table. If the product name is the only portion of the URL that's dynamic and the URL is based on the product name, you can use string functions, like LowerCase() and URLEncode() that might let you create the dynamic URL portion in an expression without any IF THEN ELSEs.

Here's a few links to the  relevant portions of the VA User's Guide for 7.2, just in case. This works the same in 7.1 and earlier releases.

SAS(R) Visual Analytics 7.2: User's Guide - Create a Link to an External URL

SAS(R) Visual Analytics 7.2: User's Guide - Text (Simple) Operators (see LowerCase)

SAS(R) Visual Analytics 7.2: User's Guide - Text (Advanced) Operators (see URLEncode)

Ashley, I hope this helps. Post back if you get stuck or have other questions.

Rick Styll

Occasional Contributor
Posts: 6

Re: Hyperlinks in Report Designer

@RickStyll_SAS: I have looked for a solution how to click on an individual  row in a list table with an url as text value which is an external link to a pdf document. Your tip looks promising but I have no idea how to  apply it.  It's too advanced for me. Could you be so kind and write more details about creating such calculated item consisted of static and dynamic parts of url? A few screen shots would be very helpful for me. I have searched VA guide but there were no simple tutorial how to do this...

I use 7.1 version of VA.

 

Thank you in advance :-)

 

 

SAS Employee
Posts: 38

Re: Hyperlinks in Report Designer

You mentioned you searched the VA User's Guide and couldn't find a simple tutorial. Just in case you didn't see this part, you might find the section of the documentation at this link helpful.

 

SAS(R) Visual Analytics 7.2: User's Guide - Create a Link to an External URL

 

To create a link to an external PDF from a list table, you'll need to go to the interactions tab in the right panel. From there, click the New option and select External Link from the drop-down.

 

 Create New External Link

 

Next, you will see a pop-up window where you can enter the static portion of the URL.

 

Screen Shot 2016-03-25 at 5.17.20 PM.png

 

From there, click the plus symbol, labeled Add a new parameter. Then you'll see...

 

Select Data Item for Dynamic URL Portion

 

Choose a data item for the source drop-down selector that represents the portion of the URL that is different for each row of your list table. If your source data contains the full URL, you might need to create a calculated data item in the left panel to truncate the portion of the URL that is the same for every row. The portion that's the same is what you'll type into the URL field near the top of this pop-up window.

 

@WKruk, I hope this helps.

 

Rick

Occasional Contributor
Posts: 6

Re: Hyperlinks in Report Designer

@RickStyll_SAS: thank you for your guide. It's really helpful! Best regards :-) 

Waldek

Post a Question
Discussion Stats
  • 4 replies
  • 1375 views
  • 1 like
  • 3 in conversation