Hi,
I want export report to pdf in programmatically in button click event . That pdf file window open on browser .So how to solve this problem .I want solution of this .Am writing this code .But it's not wroking .
var report = new TelerikComponentsWS.Reports.RepFeeReceipt(); |
report.DataSource = printdata; |
Telerik.Reporting.Drawing.ExternalStyleSheet exx = new Telerik.Reporting.Drawing.ExternalStyleSheet("~\\css\\ReprotStyleSheet.xml"); |
report.ExternalStyleSheets.Add(exx); |
report.ReportParameters[0].Value = strTitle; |
Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor(); |
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", report, null); |
string fileName= result.DocumentName + ".pdf"; |
System.Web.HttpContext.Current.Response.Clear() ; |
System.Web.HttpContext.Current.Response.ContentType = result.MimeType; |
System.Web.HttpContext.Current.Response.Cache.SetCacheability( System.Web.HttpCacheability.Private) ; |
System.Web.HttpContext.Current.Response.Expires = -1 ; |
System.Web.HttpContext.Current.Response.Buffer =true; |