Skip to main content

ReportDesignerBuilder.DataSources(Action<Dictionary<String, Object>>) Method

Provides access to the data sources available in the Web Report Designer.

Namespace: DevExpress.AspNetCore.Reporting.ReportDesigner

Assembly: DevExpress.AspNetCore.Reporting.v22.1.dll

NuGet Package: DevExpress.AspNetCore.Reporting


public ReportDesignerBuilder DataSources(
    Action<Dictionary<string, object>> configure


Name Type Description
configure Action<Dictionary<String, Object>>

A Action<T> delegate method that populates the Dictionary object passed as a parameter with the data sources.


Type Description

A ReportDesignerBuilder that can be used to further configure the Report Designer.


Use this method to set a data source and then add data-aware controls to a report in the Report Designer. Refer to the ASP.NET Core Reporting article to learn how to do specify a data source.

You may need several data sources for a report. For instance, you can assign a different data source to a subreport or detail report. In addition, you can bind the Chart, Sparkline or PivotGrid report controls to individual data sources, independent of the actual report. The following code demonstrates how to set several data sources for a Report Designer.

    var designer = Html.DevExpress().ReportDesigner("reportDesigner1").Height("1000px")
        .DataSources(configureDS => { foreach (var ds in Model.DataSources) { configureDS.Add(ds.Key, ds.Value); } });
See Also