Requirements |
|
RadControls version |
Q2 2009 |
.NET version |
2.0 |
Visual Studio version |
2005/2008 |
programming language |
C# |
browser support |
all browsers supported by RadControls |
PROJECT DESCRIPTION
This is just a little methode wich exports a report to a file programmatically. So it is possible to export a report without using the ReportViewer.
C#
void ExportToFile(Telerik.Reporting.Report reportToExport, string exportFormat, string exportPath)
{
ReportProcessor reportProcessor = new ReportProcessor();
RenderingResult result = reportProcessor.RenderReport(exportFormat, reportToExport, null);
string fileName = result.DocumentName + "." + exportFormat.ToLower();
File.WriteAllBytes(exportPath + fileName, result.DocumentBytes);
}