Opens an express report.
Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
IEaxAnalyzer | The express report that must be opened. |
The command can be used only for express reports. A report can be opened for view and for edit. To view, specify the express report in the Data property that is obtained by means of the Open (OpenWithParam) method; to edit, specify the regular report that is obtained by means of the Edit or Bind method. If required, various display parameters may be changed, the required selection by dimension may be set in the opened report.
NOTE. When an express report is obtained by means of the Bind method after editing, the report can be saved only to a new express report.
Executing the example requires a form and a button named Button1 on it. The repository contains an express report with the EXPRESS_REPORT 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("EXPRESS_REPORT").Edit As IEaxAnalyzer;
Target.Execute("ShowReporter", Context);
End Sub Button1OnClick;
Clicking the button opens the specified express report.
Executing the example requires a form and a button named Button1 on it. The repository contains an express report with the EXPRESS_REPORT identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
OLAP: IEaxAnalyzer;
Pivot: IPivot;
DimSS: IDimSelectionSet;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
Target := WinApplication.Instance.GetPluginTarget("Express");
OLAP := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
Pivot := OLAP.Pivot;
DimSS := Pivot.Selection;
Pivot.BeginSelectionUpdate;
//...
//DimSS...
//Change selection
//...
Pivot.EndSelectionUpdate;
//Open express report
Context := Target.CreateExecutionContext;
Context.Data := OLAP;
Target.Execute("ShowReporter", Context);
End Sub Button1OnClick;
Clicking the button opens the express report with the specified selection.
Executing the example requires a form and a button named Button1 on it. The repository contains a cube with the STD_CUBE identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
ExpressDesc: IMetabaseObjectDescriptor;
Express: IEaxAnalyzer;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
//Create temporary express report
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT;
CrInfo.IsTemporary := True;
CrInfo.KeepEdit := False;
ExpressDesc := MB.CreateObject(CrInfo);
Express := ExpressDesc.Open(Null) As IEaxAnaLyzer;
//Specify data source that will be opened in express report
Express.OpenCube(MB.ItemById("STD_CUBE").Open(Null) As ICubeInstance);
//Open obtained express report for view
Target := WinApplication.Instance.GetPluginTarget("Express");
Context := Target.CreateExecutionContext;
Context.Data := Express;
Target.Execute("ShowReporter", Context);
End Sub Button1OnClick;
Clicking the button creates a temporary express report. After the data source is specified, the express report opens for view.
See also: