When opening a report in xlsx using Q1'12 controls, this is throwing an error: Thread was being aborted. It then prompts me to open or save it, then says "it couldn't be downloaded". But when I click "retry" it opens fine in excel as xlsx.
Here is my code:
Here is my code:
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("xlsx", reportToExport, null);
string fileName = reportName + ".xlsx";
Response.Clear();
Response.Charset = "";
Response.ContentType = "application/vnd.xlsx";
Response.Cache.SetCacheability(HttpCacheability.Private);
Response.Expires = -1;
Response.Buffer = false;
Response.AddHeader("Content-Disposition",string.Format("{0};FileName=\"{1}\"", "attachment", fileName));
Response.OutputStream.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
Response.End();