DimSelectionSetup Command

Purpose

Creates a selection for express report dimension elements.

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
IEaxAnalyzer Express report, for dimensions of which an element selection is created.

Application Features

The command can be used only for express reports.

Example

Executing the example requires that the repository contains an express report with the EXPR identifier.

Add links to the Dimensions, Express, IO, Metabase, and UI system assemblies.

Sub UserProc;
Var
    Fs: IFileStream;
    DimSelSet: IDimSelectionSet;
    Context: IUiCommandExecutionContext;
    CommandTarget: IUiCommandTarget;
    Mb: IMetabase;
    Expr: IEaxAnalyzer;
Begin
    CommandTarget := WinApplication.Instance.GetPluginTarget("Express");
    Context := CommandTarget.CreateExecutionContext;
    Mb := MetabaseClass.Active;
    Expr := Mb.ItemById("EXPR").Bind As IEaxAnalyzer;
    Context.Data := Expr As Variant;
    DimSelSet := CommandTarget.Execute("DimSelectionSetup", Context);
    If (DimSelSet <> NullThen
        Fs := New FileStream.Create("C:\EXPR.ppexpress", FileOpenMode.Create, FileShare.Exclusive);
        Expr.SaveToStream(Fs, DimSelSet);
    End If;
End Sub UserProc;

After executing the example the express report is saved to the stream presenting the file C:\EXPR.ppexpress. Selection for the report is set using the DimSelectionSetup command.

See also:

IUiCommandTarget.Execute