Skip to main content

DxReportDesigner.DataSources Property

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

Namespace: DevExpress.Blazor.Reporting

Assembly: DevExpress.Blazor.Reporting.v23.2.JSBasedControls.dll

NuGet Package: DevExpress.Blazor.Reporting.JSBasedControls


public Dictionary<string, object> DataSources { get; set; }

Property Value

Type Description
Dictionary<String, Object>

A dictionary that contains data sources and their names.


Use this method to set up multiple data sources for a report. Multiple data sources allows you to assign an individual data source to a subreport, detail report, Chart, Sparkline or PivotGrid report controls.

The following code adds a SqlDataSource to a collection of data sources available in the Report Designer.

@page "/"
@using DevExpress.DataAccess.Sql

<DxReportDesigner ReportName="MyTableReport" Height="1000px" Width="100%" AllowMDI="false" DataSources="@myDataSources"/>

@code {
    Dictionary<string, object> myDataSources = new Dictionary<string, object>();

    protected override void OnInitialized()

    void AddDataSource()
        SqlDataSource ds = new SqlDataSource("NWindConnectionString");
        // Create a SQL query to access the Products data table.
        SelectQuery query = SelectQueryFluentBuilder.AddTable("Products").SelectAllColumnsFromTable().Build("Products");

        myDataSources.Add("Northwind", ds);
See Also