Showing posts with label webform. Show all posts
Showing posts with label webform. Show all posts

Wednesday, March 28, 2012

PDF Rendering with web form

I'm experiencing a problem with a webform which receives a binary steam back
and display it as a PDF.
The problem that is experienced is when the report reads parameters from the
querystring passed to the webform. The parameters passed to the page will
then be passed to the Reporting Services web service. The page attempts to
open the PDF, but when Adobe Acrobat Reader opens, an error appears: "Adobe
Reader could not open 'paXXXXXX.fdf' because it is either not a supported
file type or because the file has been corrupted (for example, it was sent as
an email attachment and wasn't correctly decoded)."
This problem only happens when exporting to the PDF format and runs fine in
all other formats. This error only occurs when the report is run in version
6 of Acrobat. In version 7 it is not a problem. The instance of Reporting
Services used has SP1 installed.I had a similar problem. It turned out that the web form was adding its HTML
to the end of the PDF file. Apparently Excel didn't care but Acrobat V6 did.
I fixed it by overriding the page's Render method and only called
MyBase.Render(output) when the mime type was HTML. This prevented the page's
HTML being rendered and stuck on the end of the PDF or any other non-html
stream.
Hope that helps.
Grahame
"Aidan" wrote:
> I'm experiencing a problem with a webform which receives a binary steam back
> and display it as a PDF.
> The problem that is experienced is when the report reads parameters from the
> querystring passed to the webform. The parameters passed to the page will
> then be passed to the Reporting Services web service. The page attempts to
> open the PDF, but when Adobe Acrobat Reader opens, an error appears: "Adobe
> Reader could not open 'paXXXXXX.fdf' because it is either not a supported
> file type or because the file has been corrupted (for example, it was sent as
> an email attachment and wasn't correctly decoded)."
> This problem only happens when exporting to the PDF format and runs fine in
> all other formats. This error only occurs when the report is run in version
> 6 of Acrobat. In version 7 it is not a problem. The instance of Reporting
> Services used has SP1 installed.

Friday, March 23, 2012

PDF cache problem

I have a webform that I create a pdf report from. Data in the form can be
changed but when the person creates an 'updated' report, the cached version
is pulled up instead of rerunning the report. Report Services is set to no
cache. I think this is directly related to Acrobat Reader. Has anyone seen
this? Figured out a way to force a recreation of the report? Is there a way
to dynamically change the name of the report, such as add the time in
milliseconds, that may force an updated pdf to be created?
Thanks,
Neilin the url to your report you should add rs:clearsession=true
"Neil Gould" wrote:
> I have a webform that I create a pdf report from. Data in the form can be
> changed but when the person creates an 'updated' report, the cached version
> is pulled up instead of rerunning the report. Report Services is set to no
> cache. I think this is directly related to Acrobat Reader. Has anyone seen
> this? Figured out a way to force a recreation of the report? Is there a way
> to dynamically change the name of the report, such as add the time in
> milliseconds, that may force an updated pdf to be created?
> Thanks,
> Neilsql