Skip to main content
A newer version of this page is available.
All docs
V17.2

ASPxClientReportDesigner.ReportOpening Event

Occurs when a report is about to be opened in the Web Report Designer.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v17.2.Web.Scripts.dll

Declaration

public event ASPxClientReportDesignerReportOpeningEventHandler ReportOpening

Event Data

The ReportOpening event's data class is ASPxClientReportDesignerDialogCancelEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Specifies whether or not the operation performed with a report should be canceled.
Report Specifies the report currently being processed. Inherited from ASPxClientReportDesignerDialogEventArgs.
Url Specifies the URL of the report currently being processed. Inherited from ASPxClientReportDesignerDialogEventArgs.

Remarks

Handle the ReportOpening event to perform required actions before a report is opened in the Web Report Designer. To prevent the report from being opened, set the ASPxClientReportDesignerDialogCancelEventArgs.Cancel property of an event argument to true.

The following example demonstrates how to use this event to prohibit opening reports with URLs containing a specific substring.

<script type="text/javascript" id="script">
    function reportOpening(s, e) {
        if (e.Url.toLowerCase().includes("table"))
            e.Cancel = true;
    }
</script>

<dx:ASPxReportDesigner ID="ASPxReportDesigner1" runat="server" ClientInstanceName="reportDesigner">  
    <ClientSideEvents ReportOpening="reportOpening" />   
</dx:ASPxReportDesigner>

To customize the report after it has been opened, handle the ASPxClientReportDesigner.ReportOpened event.

See Also