Good morning,
Below is the code i found from document~ I was trying to change PDF to CSV File. The problem is this method is being used in reportview or report?
Another question is what is reportName? I can pass parameters here but i dont know if it is report name here.
Thank you.
Telerik.Reporting.Processing.ReportProcessor reportProcessor =
new Telerik.Reporting.Processing.ReportProcessor();
// set any deviceInfo settings if necessary
System.Collections.Hashtable deviceInfo =
new System.Collections.Hashtable();
Telerik.Reporting.TypeReportSource typeReportSource =
new Telerik.Reporting.TypeReportSource();
// reportName is the Assembly Qualified Name of the report
typeReportSource.TypeName = reportName;
Telerik.Reporting.Processing.RenderingResult result =
reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo);
string fileName = result.DocumentName + "." + result.Extension;
string path = System.IO.Path.GetTempPath();
string filePath = System.IO.Path.Combine(path, fileName);
using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
{
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}
Below is the code i found from document~ I was trying to change PDF to CSV File. The problem is this method is being used in reportview or report?
Another question is what is reportName? I can pass parameters here but i dont know if it is report name here.
Thank you.
Telerik.Reporting.Processing.ReportProcessor reportProcessor =
new Telerik.Reporting.Processing.ReportProcessor();
// set any deviceInfo settings if necessary
System.Collections.Hashtable deviceInfo =
new System.Collections.Hashtable();
Telerik.Reporting.TypeReportSource typeReportSource =
new Telerik.Reporting.TypeReportSource();
// reportName is the Assembly Qualified Name of the report
typeReportSource.TypeName = reportName;
Telerik.Reporting.Processing.RenderingResult result =
reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo);
string fileName = result.DocumentName + "." + result.Extension;
string path = System.IO.Path.GetTempPath();
string filePath = System.IO.Path.Combine(path, fileName);
using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
{
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}