SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Displaying .PDF file in Report as though a data-bound image


Displaying .PDF file in Report as though a data-bound image

Author
Message
High Plains Grifter
High Plains Grifter
SSC-Enthusiastic
SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)

Group: General Forum Members
Points: 169 Visits: 121
Hi All,

We have a requirement to add to a report some .pdf documents, which are stored in our database as binary files (BLOBs). I see that I can add an image to the report with a database source, but is it possible to display a .pdf file in the same way, as though it were an image (there is no MIME type corresponding to image/pdf of course). The only possible solutions I have found so far involve a lot of coding work is Visual Studio and frankly are beyond my ken. I am just hoping that there is a way to simply add a .pdf embedded in the report in some way that I have missed..?

I can also access the .pdf files through a hyperlink that is also stored in the database, but the user will not be able to click the hyperlink as the report will be printed before it is handed to the end user. I don't know if this helps.

Any suggestions most welcome!
Thanks,
Mark
Neodynamic
Neodynamic
SSC-Enthusiastic
SSC-Enthusiastic (156 reputation)SSC-Enthusiastic (156 reputation)SSC-Enthusiastic (156 reputation)SSC-Enthusiastic (156 reputation)SSC-Enthusiastic (156 reputation)SSC-Enthusiastic (156 reputation)SSC-Enthusiastic (156 reputation)SSC-Enthusiastic (156 reputation)

Group: General Forum Members
Points: 156 Visits: 223
Hi Mark,

AFAIK, you cannot embed an PDF right into a RDL report. The only solution I see is that you convert the PDF to an image file and then embed such image into the report. To convert the PDF to image, you have two options, #1 you create a kind of service in .NET using some tool or #2 use an online service. Sadly, I cannot recommend any so just google a bit on this topic and try them by yourself. Regards,

LeoZ

Tools for SSRS, ASP.NET & PHP
Barcode CRI for SSRS
High Plains Grifter
High Plains Grifter
SSC-Enthusiastic
SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)

Group: General Forum Members
Points: 169 Visits: 121
Cheers LeoZ,

That is exactly the unhappy conclusion that I came to - I just hoped I was wrong as I am not very experienced with SSRS. I think I will have leave this one!

Thanks for the feedback.
Mark
Hakan Forsberg
Hakan Forsberg
SSC Rookie
SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)SSC Rookie (43 reputation)

Group: General Forum Members
Points: 43 Visits: 317
Hi,

I had a similar requirement from a customer when I was involved in an archiving project. The task was to archive old PDF files in a SQL database. The customer wanted SSRS to be able to search for the correct PDF. After finding it, it was OK to open the PDF through a new browser window which displayed the PDF. I wrote a small webservice for this project which I call (URL) from inside SSRS. The webservice sends me back the correct PDF and displays it in a separate browser window.

Hope this helps...
Steven.Howes
Steven.Howes
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1636 Visits: 2354
I haven't tried this, but it might work...

What about using the actions on a text box to open a URL to the PDF?
High Plains Grifter
High Plains Grifter
SSC-Enthusiastic
SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)SSC-Enthusiastic (169 reputation)

Group: General Forum Members
Points: 169 Visits: 121
Unfortunately, I cannot use a URL like that in this case, as the report will be printed out and given to a medical escort when they drop in at work on their way to catch a flight (the report contains lots of medical information, but the Medical History sheets etc filled out by the general practitioner of the patient have to be printed out separately by the users at the moment and sometimes they forget).

The suggested solution was that all relevant documents (which are stored as .PDFs) should appear as part of the report, so that the users only have to produce one document. They already have a link to the documents, but presumably just don't click it sometimes!

obviously, people realise that there are missing documents, but getting everything back in place wastes time and money.

Otherwise... Nice idea and thanks for it!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search