Designer error message of saving the report

Stimulsoft Reports.WEB discussion
Post Reply
mach33
Posts: 5
Joined: Thu Feb 21, 2019 2:22 pm

Designer error message of saving the report

Post 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
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Designer error message of saving the report

Post by Lech Kulikowski »

Hello,

We couldn't reproduce the issue.

Thank you.
Attachments
photo_2019-09-06_14-06-10.jpg
photo_2019-09-06_14-06-10.jpg (111.42 KiB) Viewed 1306 times
SaveMessage.zip
(2.9 MiB) Downloaded 133 times
mach33
Posts: 5
Joined: Thu Feb 21, 2019 2:22 pm

Re: Designer error message of saving the report

Post 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.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Designer error message of saving the report

Post by Lech Kulikowski »

Hello,

Thank you for the information.

Thank you.
Post Reply