Hello,
I want to generate PDF output on Click of ASP.NET Button click.I am using following code to generate it
private
void ExportToPDF(Telerik.Reporting.Report reportToExport)
{
Telerik.Reporting.Processing.
ReportProcessor reportProcessor = new ReportProcessor();
Telerik.Reporting.Processing.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 =
false;
Response.AddHeader(
"Content-Disposition",
string.Format("{0};FileName=\"{1}\"",
"attachment",
fileName));
Response.OutputStream.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
Response.End();
}
in above code "ReportProcessor" class is available in "Telerik.Reporting.Processing" Namespace, but I cant see "RenderingResult" class.Also I can't find "RenderReport" method on "reportProcessor" object.I have added both the required dll ie. "Telerik.Reporting" and "Telerik.Reporting.Processing" .But I am using trial version of this Control.
So, is it a issue related to trial version dlls or am i miising any reference thats needs to be done?
Any help would be highly appreciated.
Thanks in advance.
Regards,
Ajay