SetupSliceDimsTable Command

Purpose

Opens a standard dialog box that is used to set up data slice dimensions.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:

Value type Description
A data area or a chart built on the data area, for which it is required to show the dialog box that is used to set up data slice dimensions.

Application Features

The command can be used only for regular reports.

Fore Example

Executing the example requires a form and a button named Button1 on the form. The repository must contain a regular report with the REG_REPORT identifier, the report has a data area. The example is a handler of the OnClick event for the Button1 component.

Add links to the Metabase, Report and Ui system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    Report: IPrxReport;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    MB := MetabaseClass.Active;
    Report := mb.ItemById("REG_REPORT").Open(NullAs IPrxReport;
    Target := WinApplication.Instance.GetPluginTarget("Report");
    Context := Target.CreateExecutionContext;
    Context.Data := Report.DataIslands.Item(0);
    Target.Execute("SetupSliceDimsTable", Context);
End Sub Button1OnClick;

Clicking the button opens a dialog that is used to set up data slice dimensions.

Fore.NET Example

The requirements and result of the Fore.NET example execution match those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Ui;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    MB: IMetabase;
    Report: IPrxReport;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    WinApp: WinApplication = New WinApplicationClass_2();
Begin
    MB := Self.Metabase;
    Report := MB.ItemById["REG_REPORT"].Open(NullAs IPrxReport;
    Target := WinApp.GetPluginTarget("Report");
    Context := Target.CreateExecutionContext();
    Context.Data := Report.DataIslands.Item[0];
    Target.Execute("SetupSliceDimsTable", Context, Null);
End Sub;

See also:

IUiCommandTarget.Execute