ReportDataSourceHelper.CustomSetupReportDataSource Event

Occurs when the report data source is initialized.

Namespace: DevExpress.ExpressApp.ReportsV2

Assembly: DevExpress.ExpressApp.ReportsV2.v18.1.dll

Syntax

public event EventHandler<CustomSetupReportDataSourceEventArgs> CustomSetupReportDataSource

The event handler receives an argument of the DevExpress.ExpressApp.ReportsV2.CustomSetupReportDataSourceEventArgs type.

Handle this event to apply criteria and sorting manually. In the handler, you can use the ReportDataSourceHelper.GetMasterReportDataSource method to access the data source.

You can also use this event to use a custom Data Source component (inherited from DataSourceBase).

ReportsModuleV2 reportsModule = ReportsModuleV2.FindReportsModule(application.Modules);
reportsModule.ReportsDataSourceHelper.CustomSetupReportDataSource += delegate(object sender, CustomSetupReportDataSourceEventArgs e) {
    e.Report.DataSource = new CustomDataSource();
};