Here is some code I borrowed (from other reporting packages) to export a report to pdf. I have an empty aspx page that runs this code on load (after reading some url parameters).
You have to be sure to reference Telerik.Reporting.ImageRendering
I was having some issues with the layout of a simple nested sub report. The spacing is fine in Design View but way off in html view. So this is my fix for now.
MyReport report = new MyReport(); |
string mimeType = string.Empty; |
string extension = string.Empty; |
Encoding encoding = null; |
byte[] buffer = Telerik.Reporting.Processing.ReportProcessor.Render("PDF", report, null, out mimeType, out extension, out encoding); |
Response.Clear(); |
Response.Buffer = true; |
Response.ContentType = "application/pdf"; |
Response.BinaryWrite(buffer); |
Response.End(); |
You have to be sure to reference Telerik.Reporting.ImageRendering
I was having some issues with the layout of a simple nested sub report. The spacing is fine in Design View but way off in html view. So this is my fix for now.