Home
Analytics
display PDF file in RPT
nikodem38
Hi,
I would like to open a PDF file by clicking a picture.
How can I do that?
Thanks for your feedback
Nicolas
Find more posts tagged with
Comments
kclark
Depending on what you are trying to do it could be done using a text box and some simple html inside of a text box.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<a href="somelink.pdf"><img src="logo.jpg"></a>
</pre>
nikodem38
The picture already exist in the report.
All I need to do is add a hyperlink that points to some PDF file:
"file:///myfolder/" + row["MYCOLUMN"] + ".pdf"
But the file cannot be found!
If I replace row["MYCOLUMN"] by its value then it works fine.
file:///myfolder/myfile.pdf is OK.
"file:///myfolder/" + row["MYCOLUMN"] + ".pdf" is not OK
row["MYCOLUMN"] is used elsewhere in the report so I don't think it's the cause of my problem.
nikodem38
It seems like it comes from the double quotes at the beginning and at the end of the string:
file:///myfolder/myfile.pdf is OK
"file:///myfolder/myfile.pdf" is not OK
How can I remove these double quotes in:
"file:///myfolder/" + row["MYCOLUMN"] + ".pdf"
Thanks for your prompt feedback
Regards
Nicolas
nikodem38
If not possible, how can I open Adobe Reader in the report by clicking the picture?
nikodem38
I just found the cause of my problem.
When a hyperlink is added to an embedded picture, the type of the hyperlink in the XML source is set to "constant" by default.
That's why the string was not interpreted.
I replaced "constant" by "javascript" and now it works fine.
Regards,
Nicolas