Page 1 of 1
Alert Box in a report
Posted: Fri Apr 25, 2014 12:20 pm
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?
Re: Alert Box in a report
Posted: Fri Apr 25, 2014 1:55 pm
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.
Re: Alert Box in a report
Posted: Mon Apr 28, 2014 6:31 am
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?
Re: Alert Box in a report
Posted: Mon Apr 28, 2014 11:10 am
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.
Re: Alert Box in a report
Posted: Wed May 07, 2014 9:45 am
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();
Re: Alert Box in a report
Posted: Thu May 08, 2014 12:02 pm
by HighAley
Hello.
There is a script limit of the Flex. The maximum time is 60 seconds. You could set them with next line:
Thank you.