I'm posting this mostly for my own benefit since every time I need it I spend 20 minutes googling around to get the code snippet again.
So here's the article: LINK
Here's the Code:
TelerikReportingExportToPdf.csView on GitHub void ExportToPDF(Telerik.Reporting.Report reportToExport)
{
ReportProcessor reportProcessor = new ReportProcessor();
RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, null);
string fileName = result.DocumentName + ".pdf";
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();
}</code></pre></div>
So you can change the extensions to the following:
- IMAGE
- PDF
- RTF
- MHTML
- XLS
- CSV
- XPS
This comes from here: LINK