private void DisplayReportInBrowser() { // Variables Warning[] warnings; string[] streamIds; string mimeType = string.Empty; string encoding = string.Empty; string extension1 = string.Empty; // Setup the report viewer object and get the array of bytes byte[] bytes = ReportViewer1.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension1, out streamIds, out warnings); Response.Clear(); Response.ContentType = mimeType; Response.Cache.SetCacheability(HttpCacheability.Private); Response.Expires = -1; Response.Buffer = true; Response.AppendHeader("Content-Disposition", "inline; filename=Testing"); Response.BinaryWrite(bytes); Response.End(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)