ReportDesignTool.ShowRibbonDesigner(UserLookAndFeel, DesignDockPanelType) Method

Invokes the ribbon-based End-User Report Designer form using the specified look and feel settings, and with the specified design panels hidden.

Namespace: DevExpress.XtraReports.UI

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

Syntax

public void ShowRibbonDesigner(
    UserLookAndFeel lookAndFeel,
    DesignDockPanelType hiddenPanels
)

Parameters

Type Name Description
UserLookAndFeel lookAndFeel

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

DesignDockPanelType hiddenPanels

A DesignDockPanelType enumeration value identifying the End-User Designer dock panels to be hidden.

Use the ShowRibbonDesigner method to invoke XRDesignRibbonForm and show a report in an Office-inspired ribbon-based End-User Report Designer.

To make this method display the End-User Report Designer form with the previous ribbon version, set the static UseOfficeInspiredRibbonStyle property to false at the application's startup.

static class Program {
    static void Main() {
        DevExpress.XtraReports.Configuration.DesignSettings.Default.UseOfficeInspiredRibbonStyle = false;
        // ... 
    }
}

default-ribbon-report-designer-form

To access the XRDesignRibbonForm object of a ReportDesignTool, use the ReportDesignTool.DesignRibbonForm 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 ShowRibbonDesigner 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 standard End-User Report Designer form for a report, call the ReportDesignTool.ShowDesigner method.

Examples

This example demonstrates how to run the Ribbon End-User Designer form for a particular report, using the ReportDesignTool (via either the ReportDesignTool.ShowRibbonDesigner or ReportDesignTool.ShowRibbonDesignerDialog methods).

Note that in this example, the End-User Designer is invoked two times: the first time modally, and the second time with the Property Grid 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.

To learn about other approaches to invoke the Ribbon End-User Designer, see Quick Start.

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

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

    // Invoke the Ribbon End-User Designer form
    // and load the report into it, modally.
    dt.ShowRibbonDesignerDialog();

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

See Also