Back to Devexpress

Set the Input Focus of Dock Panels in the End-User Report Designer

xtrareports-3428-desktop-reporting-winforms-reporting-end-user-report-designer-for-winforms-api-and-customization-set-the-input-focus-of-dock-panels-in-end-user-report-designer.md

latest3.8 KB
Original Source

Set the Input Focus of Dock Panels in the End-User Report Designer

  • Aug 18, 2023
  • 2 minutes to read

This example illustrates how to switch the input focus to a specific dock panel of a Report Designer. This code switches the input focus to the Field List (instead of the Report Explorer that has the input focus set to it by default).

Important

Customization options described in this help topic are available to owners of DevExpress WinForms, DXperience, and Universal subscriptions (subscriptions that include DevExpress WinForms UI Controls). The DevExpress Reporting Subscription does not support UI customization in Report Viewer or End-User Report Designer. You can use ReportPrintTool and ReportDesignTool classes to display Print Preview and End-User Report Designer in their default configurations.

Refer to the following help topic for information on subscription options: Installation - Subscriptions that Include Reporting Components.

Note

All the Report Designer’s dock panels inherit their settings from the DesignDockPanel class which is a DockPanel class descendant.

For this reason, you need to reference the DevExpress.XtraBars.v25.2 library in your application to be able to access the Report Designer’s dock panel settings.

csharp
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 and its MDI Controller.
    // IDesignForm designForm = designTool.DesignForm;
    IDesignForm designForm = designTool.DesignRibbonForm;

    // Access the Field List and bring it to front.
    designForm.DesignDockManager[DesignDockPanelType.FieldList].Show();

    // Load a Report Designer in a dialog window.
    // designTool.ShowDesignerDialog();
    designTool.ShowRibbonDesignerDialog();
}
vb
Imports DevExpress.XtraReports.UI
Imports DevExpress.XtraReports.UserDesigner
' ...

Private Sub button1_Click(sender As Object, e As System.EventArgs)
    ' Create a Design Tool with an assigned report instance.
    Dim designTool As New ReportDesignTool(New XtraReport1())

    ' Access the standard or ribbon-based Designer form and its MDI Controller.
    ' Dim designForm As IDesignForm = designTool.DesignForm;
    Dim designForm As IDesignForm = designTool.DesignRibbonForm

    ' Access the Field List and bring it to front.
    designForm.DesignDockManager(DesignDockPanelType.FieldList).Show()

    ' Load a Report Designer in a dialog window.
    ' designTool.ShowDesignerDialog()
    designTool.ShowRibbonDesignerDialog()
End Sub

See Also

Customize Dock Panels in the End-User Report Designer

Remove Dock Panels from the End-User Report Designer