Hi , i used the following code to export report to excel by the code ,
i need the same code to export the report to xps format
}
i need the same code to export the report to xps format
void ExportReport(Telerik.Reporting.Report reportToExport) { Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource(); instanceReportSource.ReportDocument = reportToExport; ReportProcessor reportProcessor = new ReportProcessor(); RenderingResult result = reportProcessor.RenderReport("XLSX", instanceReportSource, null); string fileName = result.DocumentName + "." + result.Extension; Response.Clear(); Response.ContentType = result.MimeType; Response.Cache.SetCacheability(HttpCacheability.Private); Response.Expires = -1; Response.Buffer = true; Response.AddHeader("Content-Disposition", string.Format("{0};FileName=\"{1}\"", "attachment", fileName)); Response.BinaryWrite(result.DocumentBytes); Response.End(); }