Page 1 of 1

Designer error message of saving the report

Posted: Thu Sep 05, 2019 8:52 am
by mach33
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

Re: Designer error message of saving the report

Posted: Fri Sep 06, 2019 12:12 pm
by Lech Kulikowski
Hello,

We couldn't reproduce the issue.

Thank you.

Re: Designer error message of saving the report

Posted: Fri Sep 06, 2019 4:18 pm
by mach33
Hi,

after your example I found my problem ... I used code from programming manual from your website
and there is used e param class StiReportDataEventArgs instead of StiSaveReportEventArgs.
Thanks for help.

Re: Designer error message of saving the report

Posted: Fri Sep 06, 2019 11:56 pm
by Lech Kulikowski
Hello,

Thank you for the information.

Thank you.