Skip to Content
0
Former Member
Dec 11, 2009 at 04:24 PM

Problem while exporting report to PDF

466 Views

Hi!

I have this problem on one of my web application where it's not allowing me to save the pdf file when I export the report to pdf using ExportToHttpResponse.

Here is the code:

pReport.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, pFileName)

Now when this runs, it opens that message where it asks if I want to Open / Save /Cancel and when I click Save, it does not open the dialog box where it asks me to same the file. When I hit Open it does not do anything either...

On the code above if I put "False" for the third parameter where I have "true" then it works and opens the pdf file in same browser. But I want it to be an attachment so users can save it.

Same code works fine on other web application with a different report, but not on this one. Are there settings need to be changed on report itself?

Also after this line runs, it gets an exception with message: "Thread was being aborted."

Any help would be appreciated...

I have Crystal Reports XI and Visual Studio 2003.

Thanks

Raj