Creates an express report on cube basis and opens it for view.
Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
ICubeInstance | The opened cube, based on which an express report is to be created. |
The command is used only for opened cubes.
Executing the example requires a form and a button named Button1 on the form. The repository contains a cube with the CUBE_1 identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
Target := WinApplication.Instance.GetPluginTarget("Express");
Context := Target.CreateExecutionContext;
Context.Data := MB.ItemById("CUBE_1").Open(Null) As ICubeInstance;
Target.Execute("OpenCube", Context);
End Sub Button1OnClick;
Clicking the button creates a new express report on the basis of the Cube_1 cube. The report is opened for view.
See also: