Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WinReportServiceController.CustomShowDesignForm Event

Occurs before showing the Report Designer form.

Namespace: DevExpress.ExpressApp.ReportsV2.Win

Assembly: DevExpress.ExpressApp.ReportsV2.Win.v24.2.dll

#Declaration

public event EventHandler<CustomShowDesignFormEventArgs> CustomShowDesignForm

#Event Data

The CustomShowDesignForm event's data class is DevExpress.ExpressApp.ReportsV2.Win.CustomShowDesignFormEventArgs.

#Remarks

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

using DevExpress.ExpressApp.ReportsV2.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 Designer.

See Also