The SAS Output Delivery System and reporting techniques

Suppress a url in the PDF, RTF and ExcelXP Destinations

Reply
Regular Contributor
Posts: 155

Suppress a url in the PDF, RTF and ExcelXP Destinations

I have a program (a stored process actually), that generates html, pdf, rtf and excel output. Here is a code snippet (really pseudo-code) that illustrate the technique:

ods html ....
ods pdf .....

ods rtf....

ods tagsets=ExcelXP .....

proc report

  ....

   call define (_col_,'url','the url')

ods _all_ close;

The way this works is that the html output is sent to the user's browser and the other output is written to a temporary location. At the bottom of the output I use the ods html text option to generate hyperlinks to allow the user to download the report (without rerunning any code) for the selected destination.

But when the report contains, for example, drill down links, I don't want the urls to be active for the non-html destinations. So the question is whether there is an option or capability (perhaps via proc template) to disable the url capability for the HTML, PDF and ExcelXP destinations.

TIA for any insights or suggestions.

SAS Super FREQ
Posts: 8,864

Re: Suppress a url in the PDF, RTF and ExcelXP Destinations

Hi, Don:

  Not really. PROC TEMPLATE does a lot, but URL= works the same way in all the destinations that support linking (which RTF and PDF both do). Alternatives would be to use a "macro-ized" program to gen the same proc report code but turning the URL syntax on or off depending on your destination of choice.

  And, I'm guessing that's what you were trying to avoid, huh? Having different code for different destinations...

cynthia

Regular Contributor
Posts: 155

Re: Suppress a url in the PDF, RTF and ExcelXP Destinations

Posted in reply to Cynthia_sas

Correct Cynthia, I don't want to have to (and, in fact, really can't) write code for each destination.

The primary issue is two-fold. First, the links won't work unless I include the server name and port in the URL. Not hard to do assuming that the WIK has been set up to export _srvName and _srvPort to macro variables. But the bigger issue is that any click on a link in the document requires a new login. I figured the easiest way to avoid that frustration for the user was to just disable the links.

What I suppose I will look into now is getting rid of the awful looking blue box around the cell with the link in the PDF version. The RTF and ExcelXP versions have no indication until you hover over the cell that it is a link. If I could do that for the PDF destination, that is probably a reasonable compromise. I found some posts dating back a few years on how to do that. But I figured before trying them out (and doing a little more research to see if there is a better way in 9.3 (the posts I found were about V8 and V9.1.3), I'd see if I could just suppress the URL first.

Thanks for the quick reply.

SAS Super FREQ
Posts: 8,864

Re: Suppress a url in the PDF, RTF and ExcelXP Destinations


Oh, I hate that blue box. I think there is a way to alter it so it doesn't stand out.

http://support.sas.com/kb/24/182.html

cynthia

Regular Contributor
Posts: 155

Re: Suppress a url in the PDF, RTF and ExcelXP Destinations

Posted in reply to Cynthia_sas

Thx Cynthia. The link provided exactly the code I needed. And it was much cleaner than the examples I had found that used ODS PDF TEXT= to write raw PDF markup.

Ask a Question
Discussion stats
  • 4 replies
  • 276 views
  • 6 likes
  • 2 in conversation