Skip to main content

ReportDesignTool.ShowDesignerDialog(UserLookAndFeel) Method

Invokes the standard End-User Report Designer form which is shown modally and allows a report to be edited by end-users using the specified look and feel settings.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.Extensions.dll

NuGet Package: DevExpress.Win.Reporting

Declaration

public void ShowDesignerDialog(
    UserLookAndFeel lookAndFeel
)

Parameters

Name Type Description
lookAndFeel UserLookAndFeel

A UserLookAndFeel object which specifies the look and feel settings applied to the End-User Report Designer form.

Remarks

Use the ShowDesignerDialog method to invoke the XRDesignForm form, and show a report in a standard End-User Report Designer form.

EUDesignerMDI

To access the XRDesignForm object of a ReportDesignTool, use the ReportDesignTool.DesignForm property.

After the End-User Designer form has been loaded for the current report, its XtraReport.DesignerLoaded event is raised.

Note that when an end-user edits a report in the End-User Designer, the instance of a report, for which the ShowDesignerDialog method was called, is also changing. So, a report instance is changed even if an end-user chooses the No button in the “Report has been changed” dialog, invoked when closing a report.

ReportHasBeenChangedDialog.png

Therefore, if you want to reject all changes made by an end-user, you first need to clone a report instance to a temporary object, and then restore a report from it.

To invoke the ribbon-based End-User Report Designer form for a report, call the ReportDesignTool.ShowRibbonDesignerDialog method.

Example

This example demonstrates how to run the standard End-User Designer form for a particular report, using the ReportDesignTool, via either the ReportDesignTool.ShowDesigner or ReportDesignTool.ShowDesignerDialog methods.

Note that in this example, the End-User Designer is invoked two times: the first time modally, and the second time with the Properties window and Report Explorer windows being hidden. You can pass the list of windows to be hidden to the overloaded method as a parameter.

For this example to work correctly, the XtraReport1 class derived from the XtraReport class should exist in the example application.

using System;
using System.Windows.Forms;
using DevExpress.LookAndFeel;
using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.UserDesigner;
// ...

private void button1_Click(object sender, EventArgs e) {
    ReportDesignTool dt = new ReportDesignTool(new XtraReport1());

    // Invoke the standard End-User Designer form, modally.
    dt.ShowDesignerDialog();

    // Invoke the standard End-User Designer form
    // without the PropertyGrid and ReportExplorer panels.
    dt.ShowDesigner(UserLookAndFeel.Default, DesignDockPanelType.PropertyGrid |
DesignDockPanelType.ReportExplorer);
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowDesignerDialog(UserLookAndFeel) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also