Back to Devexpress

ReportDesignTool Class

xtrareports-devexpress-dot-xtrareports-dot-ui-95d38739.md

latest4.3 KB
Original Source

ReportDesignTool Class

An instrument for editing reports in WinForms applications.

Namespace : DevExpress.XtraReports.UI

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

NuGet Package : DevExpress.Win.Reporting

Declaration

csharp
public class ReportDesignTool :
    IReportDesignTool,
    IDisposable
vb
Public Class ReportDesignTool
    Implements IReportDesignTool,
               IDisposable

Remarks

Use the ReportDesignTool class, to show an XtraReport in a standard or ribbon-based End-User Report Designer form.

To be able to use this class, make sure to add the DevExpress.XtraReports.v25.2.Extensions.dll to the References list of your project.

Note

The ReportDesignTool class is designed for WinForms applications.

To customize reports in a WPF application, use the DevExpress.Xpf.Reports.UserDesigner control.

For web applications, use the End-User Report Designer for Web.

For more information, review the following help topic: Invoke a Default End-User Report Designer Form.

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

Implements

IReportDesignTool

Inheritance

Object ReportDesignTool SchedulerReportDesignTool

See Also

ReportDesignTool Members

ReportPrintTool

DevExpress.XtraReports.UI Namespace