09-27-2012 06:12 PM
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 tagsets=ExcelXP .....
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.
09-27-2012 06:25 PM
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...
09-27-2012 06:35 PM
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.
09-27-2012 07:02 PM
Oh, I hate that blue box. I think there is a way to alter it so it doesn't stand out.
09-27-2012 09:13 PM
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.