All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DataSourceManager.ReplaceDataSource(XtraReport, Object, Object, Boolean) Method

A static method that replaces the specified data source in a report with a new data source.

Namespace: DevExpress.XtraReports

Assembly: DevExpress.XtraReports.v20.2.dll

Declaration

public static void ReplaceDataSource(
    XtraReport report,
    object oldDataSource,
    object newDataSource,
    bool includeSubReports = false
)
Public Shared Sub ReplaceDataSource(
    report As XtraReport,
    oldDataSource As Object,
    newDataSource As Object,
    includeSubReports As Boolean = False
)

Parameters

Name Type Description
report XtraReport

The report in which to replace the data source.

oldDataSource Object

The data source to replace.

newDataSource Object

The data source that should replace the previous data source.

Optional Parameters

Name Type Default Description
includeSubReports Boolean

False

A flag that specifies whether to replace the specified data source in the report's subreports.

See Also