Back to Devexpress

ReportDesignTool.DesignForm Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-reportdesigntool-7ee7ebfd.md

latest5.0 KB
Original Source

ReportDesignTool.DesignForm Property

Provides access to the standard End-User Report Designer form of the ReportDesignTool.

Namespace : DevExpress.XtraReports.UI

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

NuGet Package : DevExpress.Win.Reporting

Declaration

csharp
public IDesignForm DesignForm { get; }
vb
Public ReadOnly Property DesignForm As IDesignForm

Property Value

TypeDescription
IDesignForm

An object implementing the IDesignForm interface (typically, an XRDesignForm instance).

|

Remarks

To learn more, see Create a Custom End-User Report Designer.

Example

This example demonstrates how to use the ReportDesignTool class, to load a report into an End-User Report Designer form.

Then, to access the properties of the report and the Designer form, use the ReportDesignTool.Report and ReportDesignTool.DesignForm properties.

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

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

    // Access the report's properties.
    dt.Report.DrawGrid = false;

    // Access the Designer form's properties.
    dt.DesignForm.SetWindowVisibility(DesignDockPanelType.FieldList | 
        DesignDockPanelType.PropertyGrid, false);

    // Show the Designer form, modally.
    dt.ShowDesignerDialog();
}
vb
Imports System
Imports System.Windows.Forms
Imports DevExpress.XtraReports.UI
Imports DevExpress.XtraReports.UserDesigner
' ...

Private Sub button1_Click(ByVal sender As Object, _ 
ByVal e As EventArgs) Handles button1.Click
    ' Create a Design Tool instance with a report assigned to it.
    Dim dt As New ReportDesignTool(New XtraReport1())

    ' Access the report's properties.
    dt.Report.DrawGrid = False

    ' Access the Designer form's properties.
    dt.DesignForm.SetWindowVisibility(DesignDockPanelType.FieldList Or _ 
        DesignDockPanelType.PropertyGrid, False)

    ' Show the Designer form, modally.
    dt.ShowDesignerDialog()
End Sub

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DesignForm property.

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.

reporting-winforms-custom-control-numeric-label/CS/Form1.cs#L21

csharp
ReportDesignTool designTool = new ReportDesignTool(new XtraReport1());
IDesignForm designForm = designTool.DesignForm;
designForm.DesignMdiController.DesignPanelLoaded += DesignMdiController_DesignPanelLoaded;

reporting-winforms-custom-control-numeric-label/VB/Form1.vb#L23

vb
Dim designTool As New ReportDesignTool(New XtraReport1())
Dim designForm As IDesignForm = designTool.DesignForm
AddHandler designForm.DesignMdiController.DesignPanelLoaded, AddressOf DesignMdiController_DesignPanelLoaded

See Also

Reporting for WinForms

ReportDesignTool Class

ReportDesignTool Members

DevExpress.XtraReports.UI Namespace