To work with the tool in Foresight Analytics Platform 10, use the new interface.

Setting Up Event Handler

To set up map event handlers, use the Parameters tab in the Map Properties dialog box.

To display the Map Properties dialog box

In the Event Handler box specify name of the macro used for handling the event on the map territory click. The method of indicating path to the macro depends on the macro implementation location:

In the units and forms of the repository, user macros are to be implemented in the global scope of names (Global Scope).

NOTE. A development environment object that contains implementation of a macro is to be connected to a regular report.

Example of Event Handler

To connect a macro to the chart, create a unit in the Object Navigator dialog box:

Sub ModMapClick(TerrId: Variant; Map: IPrxMap);
Begin
    WinApplication.InformationBox("Territory code = " + (TerrId As Integer).ToString);
End Sub ModMapClick;

where TerrId - territory code; Map - the map itself.

To execute the example, add links to the Report and Ui system assemblies.

Connect the created unit to the report. After connecting the unit, specify macro name in the Event Handler box on the Parameters tab of the Map Properties dialog box.

After attaching the macro, a message appears in case a territory in the map is addressed, such as:

See also:

Getting Started with the Reports Tool in the Web Application | Handling Report Events | Units: Report Units and Event Handling | Map Features in Regular Report