Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SAS ODS PDF Insert Link

I am trying to do something that I think would be simple. I want to insert a link to an xls workbook into a title on a chart generated in GPLOT and output through ODS as a PDF.

I have tried:

ods escapechar="^";
TITLE2 '^S={URL="\\it4\Project_Data\Daily_Detail.xlsx"} To go to the source data Click Here';

This simply displayed the text.

I then tried:

title2 link="\\it4\Project_Data\Daily_Detail.xlsx" "Click here to view table";

With this I get a link but it doesn't work. It is recognized as a link in the PDF. I can hover over it and see the address but the address is showing up as"file:///it4/Project_Data/\Daily_Detail.xlsx", When clicking on it nothing comes up.

What am I missing?

like image 935
Robert Stevens Avatar asked Apr 18 '26 01:04

Robert Stevens


1 Answers

This works on my machine:

ods pdf file="c:\temp\test.pdf";
   ods escapechar="^";
 title "^S={URL='c:\'}PROC PRINT";
 proc print data=sashelp.class;
 run;
 ods pdf close;

I get a PDF that has a blue box around the title, and if I click on the title I get asked if I want to open c:\ .

To use this in GPLOT, you may want to set NOGTITLE to get the title to not appear within the image:

ods pdf file="filename.pdf" nogtitle;

That should cause them to appear as text and then should work similarly.

like image 84
Joe Avatar answered Apr 19 '26 23:04

Joe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!