Hi I am trying to create a PDF hyperlink using t.format_cell method. But one the URL path contains '#' symbol and because of it the hyperlink generated becomes invalid. And the URL generated do not contain the text/path after '#' symbol. In the example below, the actual File path is 'file:///test/file/path/Information #51801.msg' but in PDF generated it is 'file:///test/file/path/Information ' Code: %let file_name ='Additional Information';
%let url_path = 'file:///test/file/path/Information #51801.msg';
proc template;
define style work.sample;
parent=styles.pearl;
style TableBase/
cellpadding=2pt
verticalalign=top
;
style TextUnderline from Body /
borderbottomcolor=black
borderbottomwidth=1pt
textindent=10
height=20pt
fontsize=8pt
;
end;
run;
%put %STR(NOTE: Build the report ... );
ods escapechar='~';
%let outpath=/sas_data/pdf_location;
ods pdf
file="&outpath./output_file.pdf"
;
ods trace on/ label;
data _null_;
declare odsout t();
t.table_start( name: 'Attachments', style: 'TableBase', overrides: 'width=190mm');
t.row_start();
t.format_cell(Text: "" );
t.format_cell(text: &file_name
, style: 'TextUnderline'
, url: &url_path, overrides:"color=blue"
,overrides:'');
t.row_end();
t.table_end();
run;
ods pdf close;
... View more