ComponentOne FlexReport for WinForms
Using Data Table Object as Data Source
Working with FlexReport > Data Binding in FlexReport > Using Data Table Object as Data Source

Many applications need to work on the data outside C1FlexReport and load it into DataTable objects. In such cases, you can use DataTable objects as report data sources, avoiding the need to load them again while rendering the report.

This approach is also useful in applications where:

To use a DataTable object as a C1FlexReport data source, simply load the report definition and then assign the DataTable to C1FlexReport.DataSource.Recordset property. For example:

' load DataTable from cache or from a secure/custom provider
Dim dt As DataTable = GetMyDataTable()

' load report definition (before setting the data source)
C1FlexReport1.Load(@"reportFile", "reportName")

' use DataTable as the data source
C1FlexReport1.DataSource.Recordset = dt
// load DataTable from cache or from a secure/custom provider
DataTable dt = GetMyDataTable();

// load report definition (before setting the data source)
c1FlexReport1.Load(@"reportFile", "reportName");

// use DataTable as the data source
c1FlexReport1.DataSource.Recordset = dt;