Jerry, I had some success with adding links and anchors to a pdf document. I did have help from Cynthia (via her books and writings) and Tech Support along the way. First: /*** There have been some bugs when using one file to open another file and go to the correct page with the anchor. The version of SAS will play a role in this. Thanks, Jane Eslinger SAS Technical Support If an ODS PDF ANCHOR= statement is used to create an anchor from which a URL links to a specific page in a PDF file, the links will exist, but might not work. The URL links are converted to all lower case letters, so despite attempts to use UPCASE or mixed case values when a URL= or LINK= argument is used, the links are in lower case. To circumvent the problem, use all lower case letters for the ANCHOR= value(s). See also: "Usage Note 24174: How do links work under PDF in ODS?" /*** URL sends the user away. ANCHOR brings them back ***/ /*** The placement of the anchor tag does make a difference!!! ***/ ***/ Second: I could not figure out how to link/anchor to specific words in the PDF report (I can with RTF) so I placed an anchor at the top/bottom of each PDF page. ods pdf anchor=%sysfunc(lowcase("rpt%trim(%left(&line.))%trim(%left(&brand.))%sysfunc(translate(%trim(%left(&sku.)),'xxx','.00'))%trim(%left(&lotnum.))")); *footnote8 Justify=CENTER HEIGHT=9PT "[PAGE 00000 OF 99999]"; Thirdly: I built a url from the proc report cell value to the page anchor tag. DEFINE CT_GRAPH_LINK / DISPLAY center style(column)={ cellwidth=100 url=%sysfunc(lowcase("#ct%trim(%left(&line.))%trim(%left(&brand.))%sysfunc(translate(%trim(%left(&sku.)),'xxx','.00'))%trim(%left(&lotnum.))")) COLOR=BLACK LINKCOLOR=BLACK RULES=NONE ASIS=OFF }; Finally: I added links to take me back to the anchor page I started from. I handcoded all the values and tested that they worked before I coded them as macro variable values. /*** add blank lines between the graph and the link ***/ ODS PDF TEXT=" "; ODS PDF TEXT=" "; ODS PDF TEXT=" "; /*** LINKCOLOR DETERMINES THE COLOR OF THE BORDER SURROUNDING THE TEXT ***/ /*** TEXTDECORATION=LINE_THROUGH HAD NO EFFECT ***/ /*** imbedding spaces causes the pdf text to fail ***/ /**NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. **/ ODS PDF TEXT= %IF &PARAM.= PW %THEN %DO; "^{style[JUST = C URL = %str('%lowcase(#rpt&line.&brand.%sysfunc(translate(%trim(%left(&sku.)),'xxx','.00'))&lotnum.)')COLOR=PURPLE LINKCOLOR=WHITE]&CLICK}"; %END; %IF &PARAM.= BC %THEN %DO; "^{style[JUST = C URL = %str('%lowcase(#rpt&line.&brand.%sysfunc(translate(%trim(%left(&sku.)),'xxx','.00'))&lotnum.)')COLOR=RED LINKCOLOR=WHITE]&CLICK}"; %END; %IF &PARAM.=CT %THEN %DO; "^{style[JUST = C URL = %str('%lowcase(#rpt&line.&brand.%sysfunc(translate(%trim(%left(&sku.)),'xxx','.00'))&lotnum.)')COLOR=BLACK LINKCOLOR=WHITE]&CLICK}"; %END; %IF &PARAM.=DM %THEN %DO; "^{style[JUST = C URL = %str('%lowcase(#rpt&line.&brand.%sysfunc(translate(%trim(%left(&sku.)),'xxx','.00'))&lotnum.)')COLOR=GREEN LINKCOLOR=WHITE]&CLICK}"; %END; title ""; footnote;
... View more