IEaxMap.DrillTerritory

Fore Syntax

DrillTerritory(TerritoryAttrValue: Variant; [DrillType: EaxDrillType = 1]);

Fore.NET Syntax

DrillTerritory(TerritoryAttrValue: Variant; DrillType: Prognoz.Platform.Interop.Express.EaxDrillType);

Parameters

TerritoryAttrValue. Territory identifier.

DrillType. Data drill method.

Description

The DrillTerritory method drills down the data of the selected map territory.

Comments

To drill down the data on the map, territorial dimension in the express report is to be located in rows and contain an attribute with the TOPO_ID identifier in its structure. The repository topobase keys are stored as the attribute values, that are used to display the data when specified dimension elements are selected.

When the DrillTerritory method is performed, the territory dimension selection is changing. The child elements of territory or items of level with parent items are selected according to the DrillType parameter value. The topobase, which key is specified in the TOPO_ID attribute of the item, that is common for all selected elements of dimension, is displayed after the selection edit.

The EaxDrillType.ToFixed drilldown type is not available for the DrillTerritory method. Use the TerritoryDrillable property to check if data can be drilled down.

 Fore Example

Executing the example requires a form with the Button1 button, the UiErAnalyzer component named UiErAnalyzer1 and the MapBox component named MapBox1, that displays map of the express report, connected to the UiErAnalyzer1. Specified procedure is a handler of the OnTerritoryClick event of the MapBox1 component.

Sub MapBox1OnTerritoryClick(Sender: Object; Args: IMapBoxTerritoryEventArgs);
Var
    Expr: IEaxAnalyzer;
    Map: IEaxMap;
Begin
    Expr := UiErAnalyzer1.Instance As IEaxAnalyzer;
    Map := Expr.Map;
    If Map.TerritoryDrillable(Args.TerritoryId, EaxDrillType.Down) Then
        Map.DrillTerritory(Args.TerritoryId, EaxDrillType.Down);
    End If;
End Sub MapBox1OnTerritoryClick;

Clicking on any territory by the left mouse button, the data drilldown is shown, if available.

 Fore.NET Example

Executing the example requires a form with the Button1 button, the UiErAnalyzerNet component named UiErAnalyzerNet1 and the MapBoxNet component named MapBoxNet1, that displays map of the express report, connected to the UiErAnalyzerNet1. Specified procedure is a handler of the OnTerritoryClick event of the MapBoxNet1 component.

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Express;

Private Sub mapBoxNet1_OnTerritoryClick(Sender: System.Object; Args: Prognoz.Platform.Interop.Map.MapBoxTerritoryEventArgs);
Var
    Expr: IEaxAnalyzer;
    Map: IEaxMap;
Begin
    Expr := UiErAnalyzerNet1.AnalyzerUi.Instance As IEaxAnalyzer;
    Map := Expr.Map;
    If Map.TerritoryDrillable[Args.TerritoryId, EaxDrillType.edtDown] Then
        Map.DrillTerritory(Args.TerritoryId, EaxDrillType.edtDown);
    End If;
End Sub;

Clicking on any territory by the left mouse button, the data drilldown is shown, if available.

See also:

IEaxMap