Skip to main content
All docs
V24.2

ReportDesignerDataSourceSettings Class

Contains settings that allow you to hide data source actions from the Field List panel (part of the Web End-User Report Designer).

Namespace: DevExpress.XtraReports.Web.ReportDesigner

Assembly: DevExpress.XtraReports.v24.2.Web.WebForms.dll

NuGet Package: DevExpress.Web.Reporting

Declaration

public class ReportDesignerDataSourceSettings :
    PropertiesBase,
    IPropertiesOwner

Remarks

The ReportDesignerDataSourceSettings contains settings that allow you to hide actions in the Field List.

The following image demonstrates actions available in the Field List panel:

web-designer-field-list-data-source-settings-enabled

The following code hides the Add Data Source button and UI elements that allow the user to change and delete the data source and queries in the Field List:

@using ReportWizardCustomizationServiceMvcExample.Models
@model ReportDesignerModel

<script type="text/html" id="instant-report">
    <svg viewBox="-2 -5 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <g id="Layer_1" transform="translate(-2, -5)" style="enable-background:new 0 0 32 32">
            <g id="Check">
                <polygon class="dxd-icon-fill" points="27,5 11,21 5,15 2,18 11,27 30,8  " fill="#727272" />
            </g>
        </g>
    </svg>
</script>

<script type="text/html" id="wizard-labels-page">
    <div class="dxrd-wizard-type-page dxrd-wizard-type-page-labels">
        <div class="page-title">Custom Wizard Page</div>
        <div class="dx-fieldset">
            <div class="dx-field">
                <div class="dx-field-label">Report Name</div>
                <div class="dx-field-value">
                    <div data-bind="dxTextBox: { value: label4Value }"></div>
                </div>
            </div>
            <div class="dx-field">
                <div class="dx-field-label">Label1: </div>
                <div class="dx-field-value">
                    <div data-bind="dxTextBox: { value: label1Value }"></div>
                </div>
            </div>
            <div class="dx-field">
                <div class="dx-field-label">Label2: </div>
                <div class="dx-field-value">
                    <div data-bind="dxTextBox: { value: label2Value }"></div>
                </div>
            </div>
            <div class="dx-field">
                <div class="dx-field-label">Label3: </div>
                <div class="dx-field-value">
                    <div data-bind="dxTextBox: { value: label3Value }"></div>
                </div>
            </div>
        </div>
    </div>
</script>

<link href="~/Content/reportWizardCustomization.css" rel="stylesheet" />

<script src="~/Scripts/reportWizardCustomization.js"></script>

@Html.DevExpress().ReportDesigner(settings => {
    settings.Name = "ReportDesigner1";

    settings.ClientSideEvents.CustomizeWizard = "CustomizeReportWizard";

    settings.SettingsDataSource.AllowAddDataSource = false;
    settings.SettingsDataSource.AllowEditDataSource = false;
    settings.SettingsDataSource.AllowRemoveDataSource = false;

    // Add the created data source to the list of default data sources.
    foreach (var dataSourceItem in Model.DataSources)
        settings.DataSources.Add(dataSourceItem.Key, dataSourceItem.Value);
    }).BindToUrl("TestReport").GetHtml()

The Field List with hidden actions is shown in the following image:

web-designer-field-list-data-source-settings-disabled

View Example: Reporting for Web (ASP.NET MVC, ASP.NET Core and Angular) - How to Use the Report Wizard Customization API and Hide Data Source Actions in Report Designer

Inheritance

Object
StateManager
PropertiesBase
ReportDesignerDataSourceSettings
See Also