Cancel Save Event

Stimulsoft Reports.WEB discussion
Post Reply
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Cancel Save Event

Post by MikeD »


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.

Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Cancel Save Event

Post by Vladimir »

Hello, Mike
Is there a way to cancel a ReportSave event.
What do you mean by the cancel a ReportSave event?
And also display a message in the report designer that the report has not been saved.
You can use e.ErrorCode parameter for this:

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
}
Thank you.
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Cancel Save Event

Post by MikeD »


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.
Post Reply