Engine Events
The report generator supports the events, which give an ability to make necessary operations before definite actions both on the JavaScript client-side and on the PHP server-side. You don't need any additional settings for work of events on the client-side. However, for work of events on the server-side you should add a special event handler to the page. You can find a detailed description of connection and the PHP event handler setting in the PHP Events Handler chapter.
The report generator supports the following events:
The event is called before the report is rendered. See the list below with the event handler arguments on the JavaScript client side:
Name |
Description |
||
event |
The identifier of the current event is "BeforeRender". |
||
sender |
The identifier of the component that initialized this event can take the following values:
|
||
report |
The current report object. |
This event is invoked before data request, which are needed for rendering a report. The list of the event handler arguments on the JavaScript client-side is presented in the table below.
Name |
Description |
||||||||||||||||||
event |
The identifier of the current event has the "BeginProcessData" value. |
||||||||||||||||||
sender |
The identifier of the component, which initialized this event can take the following values:
|
||||||||||||||||||
report |
Current report object |
||||||||||||||||||
command |
The identificator of the current command can take the following values:
|
||||||||||||||||||
connection |
The name of the current connection to a data source, specified in report template. |
||||||||||||||||||
connectionString |
Connection string to the SQL data source. |
||||||||||||||||||
queryString |
The SQL query for getting data. It is used only with the ExecuteQuery command. |
||||||||||||||||||
database |
The name of the current database. It can take the following values:
|
||||||||||||||||||
pathData |
The path to the data source file, specified in the report template. It's set only for XML and JSON data sources. |
||||||||||||||||||
pathSchema |
The path to the data scheme file, specified in the report template. It is set only for XML data source. |
||||||||||||||||||
dataSource |
The name of the current data source, specified in the report template. It is set only for SQL data sources. |
||||||||||||||||||
parameters |
The collection of parameters and their values, specified in an SQL data source. |
||||||||||||||||||
preventDefault |
This flag is an ability to stop further event processing by the report generator. The false value is set by default. |
In the table below, you can find the list of event handler arguments on the PHP server-side.
Name |
Description |
||||||||||
sender |
The identificator of the component, which initialized this event can take the following values:
|
||||||||||
command |
The identificator of the current command can take the following values:
|
||||||||||
connection |
The name of the current connection to a data source, specified in report template. |
||||||||||
connectionString |
Connection string to the SQL data source. |
||||||||||
queryString |
The SQL query for getting data. It is used only with the StiDataCommand::ExecuteQuery command. |
||||||||||
database |
The name of the current database. It can take the following values:
|
||||||||||
dataSource |
The name of the current data source, specified in report template. |
You can find a detailed description and samples of using in the Connecting Data Files and Connecting SQL data adapters chapters.
The event is invoked after data loading before rendering a report. In the table below you can find the list of the event handler arguments on the side of JavaScript client.
Name |
Description |
||||||||||||||||||
event |
The identificator of the current event has the "EndProcessData" value. |
||||||||||||||||||
sender |
The identificator of the component, which initialized this event can take the following values:
|
||||||||||||||||||
report |
Current report object. |
||||||||||||||||||
command |
The identificator of the current command can take the following values:
|
||||||||||||||||||
connection |
The name of the current connection to a data source, specified in report table. |
||||||||||||||||||
database |
The name of the current database. It can take the following values:
|
||||||||||||||||||
dataSource |
The name of the current data source, specified in report template. It is set only for SQL data sources. |
||||||||||||||||||
dataSet |
The prepared Stimulsoft.System.Data.DataSet object contains tables and data rows, received from a file source. |
||||||||||||||||||
result |
The collection of columns, their types and data rows, received from an SQL source. |
In the table below, you can find the list of the event handler arguments on the PHP server-side.
Name |
Description |
||||||||||
sender |
The identificator of the component, which initialized this event can take the following values:
|
||||||||||
command |
The identificator of the current command can take the following values:
|
||||||||||
connection |
The name of the current connection to a data source, specified in report template. |
||||||||||
database |
The name of the current database. It can take the following values:
|
||||||||||
dataSource |
The name of the current data source, specified in report template. It is set only for SQL data sources. |
||||||||||
result |
The collection of columns, their types and data rows, received from an SQL source. |
You can find a detailed description and samples of using in the Connecting Data Files and Connecting SQL data adapters chapters.
This event is invoked before rendering a report after preparing the report variables. In the table below, you can see the list of the event handler arguments on the JavaScript client-side:
Name |
Description |
||||||
event |
The identificator of the current event has the "PrepareVariables" variable. |
||||||
sender |
The identificator of the component, which initialized this event can take the following values:
|
||||||
report |
Current report object. |
||||||
variables |
The collection of report variables and their values. |
||||||
preventDefault |
This flag gives an ability to stop the further event handler by the report generator. The false value is set by default. |
In the table below you can find the list of the event handler arguments on the PHP server-side:
Name |
Description |
||||||
sender |
The identificator of the component, which initialized this event can take the following values:
|
||||||
variables |
The collection of report variables and their values. |
You can find a detailed description and samples of using in the Work with report variables chapter.