XRDesignPanel.ExecCommand(ReportCommand) Method

Executes the specified report command without any parameters passed to it.

Namespace: DevExpress.XtraReports.UserDesigner

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


public void ExecCommand(
    ReportCommand command
Public Sub ExecCommand(
    command As ReportCommand


Type Name Description
ReportCommand command

A ReportCommand enumeration value, specifying the report command to execute.

Use the ExecCommand method to perform various actions in the End-User Designer, such as clicking a menu item, a toolbar button, a context menu item, or a context link. All the available report commands are listed in the ReportCommand enumeration.

To execute a report command with parameters passed to it, use the overloaded XRDesignPanel.ExecCommand method with the args parameter.


This example illustrates how to execute report commands in an End-User Report Designer by calling the XRDesignPanel.ExecCommand method of an active XRDesignPanel.

using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.UserDesigner;
// ...

private void button1_Click(object sender, System.EventArgs e) {
    // Create a Design Tool with an assigned report instance.
    ReportDesignTool designTool = new ReportDesignTool(new XtraReport1());

    // Access the standard or ribbon-based Designer form.
    // IDesignForm designForm = designTool.DesignForm;
    IDesignForm designForm = designTool.DesignRibbonForm;

    // Create a new blank report to initialize a Design Panel.

    // Handle the Design Panel's Loaded event.
    designForm.DesignMdiController.DesignPanelLoaded += DesignMdiController_DesignPanelLoaded;

    // Load a Report Designer in a dialog window.
    // designTool.ShowDesignerDialog();

void DesignMdiController_DesignPanelLoaded(object sender, DesignerLoadedEventArgs e) {
    // Run the Report Wizard every time a Report Designer is loaded.
See Also