Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DataSourceManager.AddDataSources(XtraReport, IComponent[]) Method

Adds the specified data sources to a report.

Namespace: DevExpress.XtraReports

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

#Declaration

public static void AddDataSources(
    XtraReport report,
    params IComponent[] dataSources
)

#Parameters

Name Type Description
report XtraReport

A report instance.

dataSources IComponent[]

A list of data sources.

#Example

The following code sample adds two JSON data sources to a report:

using DevExpress.DataAccess.Json;
using DevExpress.XtraReports;
//...

var report = new XtraReport1();

var jsonDataSource1 = new JsonDataSource { /* ... */ };
var jsonDataSource2 = new JsonDataSource { /* ... */ };

DataSourceManager.AddDataSources(report, jsonDataSource1, jsonDataSource2);
See Also