Cancel Save Event
Cancel Save Event
Is there a way to cancel a ReportSave event. And also display a message in the report designer that the report has not been saved.
Cancel Save Event
Hello, Mike
Thank you.
What do you mean by the cancel a ReportSave event?Is there a way to cancel a ReportSave event.
You can use e.ErrorCode parameter for this:And also display a message in the report designer that the report has not been saved.
Code: Select all
protected void StiWebDesigner1_SaveReport(object sender, StiWebDesigner.StiSaveReportEventArgs e)
{
e.ErrorCode = 1;
// -1: default value, the message is not displayed
// 0: display 'Report is successfully saved' message
// Otherwise, displays an error code
}
Cancel Save Event
Setting the errorcode to 1 helped. At least I can display some message. And then write a more detailed description to a log file.
Thank you.