Alert Box in a report

Stimulsoft Reports.Flex discussion
Locked
tzalla
Posts: 12
Joined: Wed Apr 09, 2014 11:48 am

Alert Box in a report

Post by tzalla »

Hello i am using Flex API to load mrt files with .xsd schema files and i would like to pop up an alert box with some info regarding the error occured.

my code is like
report.loadReportFromString(reportString);

var database: StiXmlDatabase = new StiXmlDatabase("Connection1",reportOption.XSDPath,reportHandler);
report.dictionary.databases.clear();
report.dictionary.databases.add(database);
report.showDialog();

can you help so that i add an alert box when i need to. what is the function calls for adding a meesage box in the report instance?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Alert Box in a report

Post by Vladimir »

Hello,

To display any messages you can use the following code:

Code: Select all

StiMessageBox.showMessage("Title", "Message");
Also, please explain at what point you want to display a message? When connecting data? At the completion of the report building? Another option?

Thank you.
tzalla
Posts: 12
Joined: Wed Apr 09, 2014 11:48 am

Re: Alert Box in a report

Post by tzalla »

at the completion of the report building..so that i inform the user of any bug/error...regarding the parameters that he has inserted..and what is the class so that i import the SimessageBox instance?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Alert Box in a report

Post by Vladimir »

Hello,
at the completion of the report building..so that i inform the user of any bug/error...regarding the parameters that he has inserted
You can use the following code:

Code: Select all

report.addEventListener(StiReportEvent.END_RENDER, onReportRender);
...

		private function onReportRender(event: StiReportEvent): void
		{
			event.target.removeEventListener(onReportRender);
			StiMessageBox("Message", "Report '" + event.report.reportName + "' building is completed.";
		}
what is the class so that i import the SimessageBox instance?
import stimulsoft.controls.visual.dialogs.StiMessageBox;

Thank you.
tzalla
Posts: 12
Joined: Wed Apr 09, 2014 11:48 am

Re: Alert Box in a report

Post by tzalla »

hello i have another question regarding the timeout upon loading big datasets to reports, is there any way we can set and influense the timer's timeout period so that the report does not throw exception. the code i am using is :

report.loadReportFromString(reportString);
var database: StiXmlDatabase = new StiXmlDatabase("Connection1",.....XSDPath,reportHandler);
report.dictionary.databases.clear();
report.dictionary.databases.add(database);
report.showDialog();
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Alert Box in a report

Post by HighAley »

Hello.

There is a script limit of the Flex. The maximum time is 60 seconds. You could set them with next line:

Code: Select all

-default-script-limits 1000 60
Thank you.
Locked