Designer error message of saving the report
Posted: Thu Sep 05, 2019 8:52 am
Hi,
is there still posibility in designer to use built-in dialog box with error message in OnSaveReport/OnGetReport?
In some of yours programing manual there is:
--- By default, after saving the report, the designer continues working without displaying any messages. If necessary, after saving the report, it is possible to display a dialog box with an error or a text message. For this
--- purpose the special properties - e.ErrorCode and e.ErrorString - in the arguments of the event are used.
protected void StiWebDesigner1_SaveReport(object sender, StiReportDataEventArgs e)
{
StiReport report = e.Report;
// ...
e.ErrorCode = 123;
//e.ErrorString = "Some message after saving";
}
--- If you set a positive integer value for the e.ErrorCode property, the user will see the error message of saving the report and the error code, where the error code is the integer value.
--- If you set a string value for the e.ErrorString property, a dialog with the specified text will be displayed. The text can contain both a save error message or a warning, or any other message.
I can't use it.
I even tried
//StiWebActionResult res = new StiWebActionResult("File saved.");
//StiWebDesigner1.SaveReportResult(string.Format("Could not save report! Exception: {0}", ex.Message));
//System.StiError.errorMessageForm.show("Your message text", true);
but still can't show any dialog box.
Thank you for any help.
PS: curently on Stimulsoft.Report.Web, Version=2019.2.3
is there still posibility in designer to use built-in dialog box with error message in OnSaveReport/OnGetReport?
In some of yours programing manual there is:
--- By default, after saving the report, the designer continues working without displaying any messages. If necessary, after saving the report, it is possible to display a dialog box with an error or a text message. For this
--- purpose the special properties - e.ErrorCode and e.ErrorString - in the arguments of the event are used.
protected void StiWebDesigner1_SaveReport(object sender, StiReportDataEventArgs e)
{
StiReport report = e.Report;
// ...
e.ErrorCode = 123;
//e.ErrorString = "Some message after saving";
}
--- If you set a positive integer value for the e.ErrorCode property, the user will see the error message of saving the report and the error code, where the error code is the integer value.
--- If you set a string value for the e.ErrorString property, a dialog with the specified text will be displayed. The text can contain both a save error message or a warning, or any other message.
I can't use it.
I even tried
//StiWebActionResult res = new StiWebActionResult("File saved.");
//StiWebDesigner1.SaveReportResult(string.Format("Could not save report! Exception: {0}", ex.Message));
//System.StiError.errorMessageForm.show("Your message text", true);
but still can't show any dialog box.
Thank you for any help.
PS: curently on Stimulsoft.Report.Web, Version=2019.2.3