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:
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 ...?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();
Thanx in advance





Reply With Quote