• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

SAS Enterprise Manager -- Can a Hyperlink be in the DATA-Rows of a Report?

Hello.
I know I can place a Single link on a section of a report.
However, for a generated report that goes out to users (like an html page or a pdf or excel file), can I code the data results to DISPLAY one text (like a Short account number, 12345), but then have it be a lengthy hyperlink that can be clicked to go the URL?  

Perhaps a Calculated Field that is AccountURL that is calculated as  "www.myurl.blah?Account=" || AccountNo  ,  or something similar?  I have done it as such a field, but that DISPLAYS the entire lengthy URL, but I would like to have it be more of an intelligent Hyperlink that JUST SHOWS the Short Account Number.

-----  Report1 ------
Account      Name   Total
12345         Smith    $500
45222         Jones    $300
34428         Taylor    $200
------ Generated by EM -----

Thank you!
murach


         
0
murach
Asked:
murach
  • 2
1 Solution
 
theartfuldazzlerCommented:
0
 
murachAuthor Commented:
Excellent article!  Very Close...
So far, I've redone the query to make it include the HTML tag.
It looks something like this.
'<a href="http://www.abc.com?id=' || t1.test_id || '">' || t1.test_id || ' </a>'

But, it still Displays the lengthy URL text and html tags.   So, the PDF article says just apply the Custom Format. So, I read that part, and then looked up PROC FORMAT.... but (maybe I'm not understanding it right) it is showing how to do a format for SPECIFIC "values" that are hardcoded into the URL (as well as the Display).

Is there a "format" I can apply to make it just display the "id" (and Different IDS for each record)? Would you let me know how to do a PROC FORMAT more generically?
ie, FORMAT1URL is "http://www.abc.com?id=" + differentIDfromData + || '">' || differentIDfromData || ' </a>'

Thanks.

 
0
 
murachAuthor Commented:
Actually, It DOES Work with just the correct HTML (and no need for a Custom Format), as long as I Export as HTML report.  (It does Not work, btw, if exported out as a PDF --- which displays the long tag w/o resolving, though it does behave as a hyperlink in the PDF).

Thank you!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now