BookmarkSubscribeRSS Feed
DonH
Lapis Lazuli | Level 10

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.

4 REPLIES 4
Cynthia_sas
SAS Super FREQ

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

DonH
Lapis Lazuli | Level 10

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.

Cynthia_sas
SAS Super FREQ


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

DonH
Lapis Lazuli | Level 10

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 884 views
  • 6 likes
  • 2 in conversation