|
-
March 5th, 2008, 05:48 AM
#1
Query in Exporting Report to PDF
Hi All,
In my web application I want to programatically export the rdlc file to PDF & save it to the specified destination.
Below is the code to export the rdlc file:
Code:
string mimeType;
string encoding;
string fileNameExtension;
string[] streams;
Microsoft.Reporting.WebForms.Warning[] warnings;
byte[] pdfContent = ReportViewer1.LocalReport.Render("PDF", null, out mimeType, out encoding, out fileNameExtension, out streams, out warnings);
////Return PDF
this.Response.Clear();
this.Response.ContentType = "application/pdf";
this.Response.AddHeader("Content-dispostion", "attachment; filename=SampleExportReport.pdf");
this.Response.BinaryWrite(pdfContent);
this.Response.End();
The problem that this code prompts me to Open, Save or Cancel. What modifications are required so that I can save the file without prompting the user to a specific location ...?
Thanx in advance
-
March 6th, 2008, 10:23 AM
#2
Re: Query in Exporting Report to PDF
You need to use a io.write if you're looking to save it on the web server.
Consider rating any helpful responses. I do not provide line level response for C#. Get your C# help in the C# forum!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|