Opens a standard dialog box that is used to set up parameters of the map legend located on one of the sheets of regular report.
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: IPrxMapLegend | The map legend, for which the parameter setup dialog box is to be displayed. |
Element 2: IPrxReport | The regular report, on a page of which a map and a legend are created. |
The command can be used only for regular reports. Executing the command shows True if the OK button is clicked in the dialog box, and False if the Cancel button is clicked.
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;
Legend: IPrxMapLegend;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Data: Array;
Begin
Rep := UiReport1.Instance As IPrxReport;
Legend := (Rep.ActiveSheet As IPrxTable).TabSheet.Objects.Object("PrxMapLegend1") As IPrxMapLegend;
Target := WinApplication.Instance.GetPluginTarget("Report");
Context := Target.CreateExecutionContext;
Data := New Variant[2];
Data[0] := Legend;
Data[1] := Rep;
Context.Data := Data;
Target.Execute("MapLegendSetup", Context);
End Sub Button1OnClick;
Clicking the button opens a standard dialog box that is used to set up map legend parameters.
See also: