Pass DataTable from .NET to Report - majorsilence/Reporting GitHub Wiki

dotnet add package Majorsilence.Reporting.RdlViewer

In this example a rdl viewer is created and then we assign a .net DataTable as the data for the reports DataSet "DataSetNameInYourReport".

using fyiReporting.RDL;
using fyiReporting.RdlViewer;
using fyiReporting.Data;

fyiReporting.RdlViewer.RdlViewer rdlView = new fyiReporting.RdlViewer.RdlViewer();
rdlView.SourceFile = new Uri("\\path\to\your\report.rdl");
rdlView.Parameters += string.Format("&parameter_name={0}", "What ever you want to pass in");

// This table needs to match the one you are setting
rdlView.Report.DataSets["DataSetNameInYourReport"].SetData(YourDataTable);  

rdlView.Rebuild();

See the sample project.

Find the dataset name in the designer

The Data Set Name