in the official demo Dashboard.trdx report file, it defines two datasources:
1. yearDataSource
2. mainDataSource
I am trying to render the report as pdf with the ability to update the data source from the code (runtime), like this:
static void SaveReport(Telerik.Reporting.Report report, string fileName)
{
ReportProcessor reportProcessor = new ReportProcessor();
Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = report;
RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null);
using (FileStream fs = new FileStream(fileName, FileMode.Create))
{
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}
}
it only allows me to set the report.DataSource, not sure how to update all the data sources (yearDataSource & mainDataSource).
Can I just pass a dataset with 2 tables (named "yearDataSource" & "mainDataSource")?