Showing posts with label embed. Show all posts
Showing posts with label embed. Show all posts

Thursday, March 22, 2012

Embed PDF inside of SQL Server Report Servics Report

Hi ...

I posted this same question on the ASP.NET forum and haven't received an answer, so I thought I'ld move the discussion over to this forum. My question has been read several times, so I know I'm not the only one facing this problem, but nobody seems to know how to make it happen.

Anyhow, I'm building a system where we collect a great deal of meta data inside of SQL Server. The meta data is associated wtih files that the users can attach - image files and PDFs. I can get the image files to display properly, however I can find no way to actually display the contents of the PDF file as part of the report.

We want to print out the meta data as a header to the PDF and then print the PDF in it's entirety. As an example, we would print out:

Emergency Plan Name: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Facility Name: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Last Review Date: 99/99/9999 Reviewed By: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

HERE IS WHERE I WOULD WANT TO PRINT OUT THE ASSOCIATED PDF's --

-- Emergency Plan --

-- Evacuation Plan 1 --

-- Evacuation Plan 2 --

I can print the file names - they are fields in the database, but how do I embed the actual PDF in to the report? They can print on different pages - I don't care about that, but I need to get them to be a part of the report.

Thanks ...

David

Any day above ground is a good day!

It's not possible to embed a PDF in a RS report.

If they're single page PDF's then you could try and code something clever that outputs them as images and embed the images.

Other than that I don't see a way of doing this.

|||Ok, so there is no built in functionality to handle embedding and outputting PDF's within reports built via SSRS. Has anyone seen any Custom Report Items that have been built that would allow me to have PDF's print in-line as part of the report?

Thanks ...

David
Any day above ground is a good day!|||

Beyond PDF embedding - where is a good site to review Custom Report Items? Either for purchase or open source?

Thanks ...

David

Any day above ground is a good day!

sql

Sunday, February 19, 2012

*Passing parameters to an SP*

Hi
I need to embed Reports into an aspx page.
So I need to send parameters to the Report from the UI (aspx page).
I can do this using parameterized reports but I want to pass the parameters from the aspx page and not the report body .
Can anyone suggest how to do that.
Moreover in my application I have a Data Access Layer which is to be used to call the SPs. We dont call the SP directly. Then this Data Access layer returns the dataset.
Is it possible to integrate Reporting Services in such an architecture. I want this layer to get values from the Database otherwise I see calling the SP directly as the only option.
Thanks in advance
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.In Brian Larson's book there is an example of how to use aspx pages to call
RS. (Chapter 12)
http://www.osborne.com/products/0072232161/0072232161_code.zip
Regards,
Cem
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:eFyl4etWEHA.3476@.tk2msftngp13.phx.gbl...
> Hi
> I need to embed Reports into an aspx page.
> So I need to send parameters to the Report from the UI (aspx page).
> I can do this using parameterized reports but I want to pass the
parameters from the aspx page and not the report body .
> Can anyone suggest how to do that.
> Moreover in my application I have a Data Access Layer which is to be used
to call the SPs. We dont call the SP directly. Then this Data Access layer
returns the dataset.
> Is it possible to integrate Reporting Services in such an architecture. I
want this layer to get values from the Database otherwise I see calling the
SP directly as the only option.
> Thanks in advance
>
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.|||Cem Demircioglu wrote:
> In Brian Larson's book there is an example of how to use aspx pages
> to call RS. (Chapter 12)
> http://www.osborne.com/products/0072232161/0072232161_code.zip
> Regards,
> Cem
IMHO the sample code in ReportFrontEnd.aspx.vb has a minor error. In my
experience the call to
HttpContext.Current.Response.End()
within a try-catch block will _always_ end up in an exception of the kind
"the thread has been interrupted" or so.
Instead of coding
...
' Send the byte array containing the report as a binary response.
HttpContext.Current.Response.BinaryWrite(report)
HttpContext.Current.Response.End()
Catch ex As Exception
HttpContext.Current.Response.ClearHeaders()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = "text/html"
HttpContext.Current.Response.Write("&
Error"
& ex.Message & "
")
HttpContext.Current.Response.End()
End Try
one should use
' Send the byte array containing the report as a binary response.
HttpContext.Current.Response.BinaryWrite(report)
Catch ex As Exception
HttpContext.Current.Response.ClearHeaders()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = "text/html"
HttpContext.Current.Response.Write("<HTML><BODY><H1>Error</H1><br><br>"
& ex.Message & "</BODY></HTML>")
End Try
HttpContext.Current.Response.End()
... means keep the HttpContext.Current.Response.End() out of a try-catch
block.
roland