MapTerritoryInfoSetup Command

Purpose

Opens a standard dialog box that is used to set up parameters of the map territory info located on one of the sheets of regular report.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify an array of the Variant type in this property, the elements of this array contain the following values:

Value type Description
Element 1: IPrxMapTerritoryInfo The territory info of the map, for which it is required to show the parameter setup dialog box.
Element 2: IPrxReport The regular report, on a page of which a map and territory info are created.

Application Features

The command can be used only for regular reports. Executing the command shows logical True if the OK button is clicked in the dialog box, and False if the Cancel button is clicked.

Example

Executing the example requires a form with the Button1 button, the ReportBox component and the UiReport component named UiReport1, which is used as a data source for the ReportBox component. The active sheet of the regular report connected to the UiReport1 component contains a map and a map legend with the PrxMapLegend1 identifier.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Rep: IPrxReport;
    TerrInfo: IPrxMapTerritoryInfo;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Data: Array;
Begin
    Rep := UiReport1.Instance As IPrxReport;
    TerrInfo := (Rep.ActiveSheet As IPrxTable).TabSheet.Objects.Object("PrxMapTerritoryInfo1"As IPrxMapTerritoryInfo;
    Target := WinApplication.Instance.GetPluginTarget("Report");
    Context := Target.CreateExecutionContext;
    Data := New Variant[2];
    Data[0] := TerrInfo;
    Data[1] := Rep;
    Context.Data := Data;
    Target.Execute("MapTerritoryInfoSetup", Context);
End Sub Button1OnClick;

Clicking the button opens a standard dialog box that is used to set up parameters of map territory info.

See also:

IUiCommandTarget.Execute