The requested page is not available for the requested platform. You are viewing the content for Default platform.

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.v19.1.dll

Declaration

public ReportDesignerBuilder DataSources(
    Action<Dictionary<string, object>> configure
)
Public Function DataSources(
    configure As Action(Of Dictionary(Of String, Object))
) As ReportDesignerBuilder

Parameters

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.

Returns

Type Description
ReportDesignerBuilder

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

Remarks

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")
        .Bind(Model.Report)
        .DataSources(configureDS => { foreach (var ds in Model.DataSources) { configureDS.Add(ds.Key, ds.Value); } });
}
@designer
See Also