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
NuGet Package: DevExpress.AspNetCore.Reporting
Declaration
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