The requested page is not available for the requested platform. You are viewing the content for Default platform.

WinReportServiceController.CustomShowDesignForm Event

Occurs before showing the Report Designer form.

Namespace: DevExpress.ExpressApp.Reports.Win

Assembly: DevExpress.ExpressApp.Reports.Win.v19.1.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