Article information
Article relates to
Telerik Reporting v.6.x
Created by
Trayko, Telerik
Last modified
August 24, 2012
Last modified by
Steve, Telerik
void
SaveReport(Telerik.Reporting.Report report,
string
fileName)
{
ReportProcessor reportProcessor =
new
ReportProcessor();
Telerik.Reporting.InstanceReportSource instanceReportSource =
Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = report;
RenderingResult result = reportProcessor.RenderReport(
"PDF"
, instanceReportSource,
null
);
using
(FileStream fs =
FileStream(fileName, FileMode.Create))
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}
Sub
SaveReport(report
As
Telerik.Reporting.Report, fileName
String
)
Dim
reportProcessor
New
ReportProcessor()
instanceReportSource
Telerik.Reporting.InstanceReportSource()
instanceReportSource.ReportDocument = report
result
RenderingResult = reportProcessor.RenderReport(
Nothing
Using fs
FileStream(fileName, FileMode.Create)
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length)
End
Using
Resources Buy Try