Page 1 of 1

Cancel Save Event

Posted: Wed Jun 09, 2010 7:21 pm
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.


Cancel Save Event

Posted: Thu Jun 10, 2010 1:45 am
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.

Cancel Save Event

Posted: Thu Jun 10, 2010 6:50 am
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.