The SAS Output Delivery System and reporting techniques

ODS RTF and hyperlinking to external files

Reply
N/A
Posts: 0

ODS RTF and hyperlinking to external files

Hello,
I am having a problem when creating an RTF document with ODS RTF and PROC REPORT. I am creating a hyperlink in the document to a specific page in an external PDF file. When the program runs interactively, and the RTF document is spawned in the results viewer, the link works perfectly and the appropriate page of the PDF document appears.

However, upon exiting SAS and simply opening the created RTF with Word, the hyperlink does not work properly. The external PDF is opened, but stays at the first page and not the page directly hyperlinked to.

The hyperlink is created something like
'{See {\field {\*\fldinst HYPERLINK "\\blankcrf.pdf#pg' ||trim(left(pg)) || '"}{\fldrslt {\cs15\cf2 Page ' || trim(left(pg)) || '}}}}';

I have set bookmarks in the PDF document named "pg1","pg2","pg3", etc that links to the first, second, third, etc page. I also tried setting destinations in the PDF document with the same name, but to no avail.

Any suggestions on why the hyperlink seems to work fine in the results viewer within interactive SAS, but not outside of SAS? I did notice within the interactive mode, the PDF is spawned in an Internet Explorer window (file:///), but when opened outside of SAS, the PDF document opens in the version of Adobe I am running.

Thanks for any suggestions.
SAS Super FREQ
Posts: 8,743

Re: ODS RTF and hyperlinking to external files

Hi:
I have not needed to click on a URL in an RTF file to link to a specific page in a PDF file. I have successfully gone from a link in a PDF document to another location inside that same document, using these techniques:
http://support.sas.com/kb/24/174.html

The SAS Results window does use a "helper" plug in to view RTF and PDF results. But, once you're outside of SAS, I would expect that Acrobat Reader would be the preferred application to open PDF file.

You might want to work with Tech Support on this issue, because I would suspect that the link (if it's going to work) will have to be built specifically for the version of Acrobat Reader that will be used -outside- of SAS.

To open a track with Tech Support, use the form found at this link:
http://support.sas.com/ctx/supportform/createForm

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 365 views
  • 0 likes
  • 2 in conversation