ASPxClientReportDesigner.ReportSaving Event
Occurs when a report is about to be saved in the Web Report Designer.
Namespace: DevExpress.XtraReports.Web.Scripts
Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll
Declaration
Event Data
The ReportSaving 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 ReportSaving event to perform required actions before a report is saved to a server-side report storage of the Web Report Designer.
This event fires when a user saves a report using the Save or Save As menu command.
To prevent the report from being saved, set the ASPxClientReportDesignerDialogCancelEventArgs.Cancel property of an event argument to true.
The following example demonstrates how to use this event to prohibit saving reports under specific URLs.
<script type="text/javascript" id="script">
function reportSaving(s, e) {
if (e.Url.toLowerCase().includes("table"))
e.Cancel = true;
}
</script>
<dx:ASPxReportDesigner ID="ASPxReportDesigner1" runat="server" ClientInstanceName="reportDesigner">
<ClientSideEvents ReportSaving="reportSaving"/>
</dx:ASPxReportDesigner>
After the report has been saved, the ASPxClientReportDesigner.ReportSaved event occurs.