In Telerik 2012 Q1 i have created a reportbook. This reportbook needs to be opened in a new window. I cannot create this option. I'm using the following code:
This code is generated from several threads but I can't get it worked! It opens a PDF but in the same window!
Thanks in advance!
void ExportToPDF(Telerik.Reporting.ReportBook reportToExport) { var deviceInfo = new Hashtable(); ReportProcessor reportProcessor = new ReportProcessor(); RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, deviceInfo); ////Create filename for PDF if saved //string fileName = result.DocumentName + ".pdf"; Response.Clear(); Response.ContentType = result.MimeType; Response.Cache.SetCacheability(HttpCacheability.Private); Response.Expires = -1; Response.Buffer = true; ////Code for automatically save PDF report //Response.AddHeader("Content-Disposition", // string.Format("{0};FileName=\"{1}\"", // "attachment", // fileName)); Response.BinaryWrite(result.DocumentBytes); Response.End(); }This code is generated from several threads but I can't get it worked! It opens a PDF but in the same window!
Thanks in advance!