Dataodyssey Express allows to code event handlers using the Visual FoxPro syntax. You can handle events when executing missions, cube updates or reports. Dataodyssey Express also offers the mechanism of creating functions, procedures, classes, forms and Visual FoxPro reports, which you can open from events.
To handle the events of data model templates expand the Events directory of the model, select the required event and click Edit Event.
If you have chosen a data model template to create a new mission or cube update, all the event handlers will be copied from the template to the mission or update. there you can change them or create the new ones. Find the required event in the Event directory and click the Edit button above the model structure.
The Event button used to edit report events is located in the bottom of report properties window and the Before and After buttons above the report form copy lists.
When creating event handlers it is necessary to stick to the following general rules:
do not use commands of data environment global change (Release All, Clear All, etc.);
in the beginning of a handler save current alias in a local variable and return it current when exiting the handler;
do not change the indicators of currently opened alias records. If you need to do it, save them in the beginning of a handler and restore in the end;
for environment exploration and event debugging launch Dataodyssey Express in Visual FoxPro 9.0 and insert SET STEP ON into the code of the event;
when possible write functions and procedures beforehand and run them from event handlers.
The following events can be processed:
Appears before the initialization of a mission or cube update. At this moment it is possible, for example, to run application programs using the Automation Server technology and execute their methods for specific preparation of data in the tables.
Appears when the program has prepared a mission or a cube update for data retrieval.
Before data select
Appears when the program is ready to retrieve data of a mission or cube update.
After data select
Appears when the program has retrieved data for a mission or a cube update. ! If you create this event handler for subquery missions or UNION sections of compatible sources, the retrieval speed can dramatically drop !
Before details select
Appears before a detailed mission data retrieval.
After details select
Возникает после выборки деталей детальной миссии
Appears after a detailed mission data retrieval.
Appears before the dialogue box with filter conditions for report missions.
Appears before the report missions execution.
Appears after the report missions execution.
Main form before report
Appears before the main report form execution.
Main form after report
Appears after the main report form execution.
Form before report
Appears before the report form execution.
Form after report
Appears after the report form execution.