.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.
.NET Core 3.0+
The page you are viewing does not exist in the .NET Core 3.0+ platform documentation. This link will take you to the parent topic of the current section.

WinReportServiceController.CustomShowDesignForm Event

Occurs before showing the Report Designer form.

Namespace: DevExpress.ExpressApp.Reports.Win

Assembly: DevExpress.ExpressApp.Reports.Win.v19.2.dll

Declaration

public event EventHandler<CustomShowDesignFormEventArgs> CustomShowDesignForm
Public Event CustomShowDesignForm As EventHandler(Of CustomShowDesignFormEventArgs)

Event Data

The CustomShowDesignForm event handler receives an argument of the DevExpress.ExpressApp.Reports.Win.CustomShowDesignFormEventArgs type.

Remarks

The CustomShowDesignForm event is raised when the WinReportServiceController.ShowDesigner method shows the Report Designer form. Handle this event to implement the custom logic to be executed before showing the Report Desigher. The following snippet illustrates how to perform customizations of DesignForm and Report objects - hide the Report Designer from the Windows taskbar and disable the grid drawing.

using DevExpress.ExpressApp.Reports.Win;
// ...
public class CustomizeReportDesignerController : ViewController {
    private WinReportServiceController reportService;
    protected override void OnActivated() {
        base.OnActivated();
        reportService = Frame.GetController<WinReportServiceController>();
        if (reportService != null) 
            reportService.CustomShowDesignForm += reportService_CustomShowDesignForm;
    }
    void reportService_CustomShowDesignForm(object sender, CustomShowDesignFormEventArgs e) {
        ((System.Windows.Forms.Form)e.DesignForm).ShowInTaskbar = false;
        e.Report.DrawGrid = false;
    }
    protected override void OnDeactivated() {
        if (reportService != null)
            reportService.CustomShowDesignForm -= reportService_CustomShowDesignForm;
    }
}

You can set the Handled parameter to true to suppress the default Report Desigher.

See Also