It opens a regular report or creates a new report not connected to the repository.
Command parameters are passed in the Data property. To ensure command execution, specify one of the following values in this property:
Value type | Description |
IPrxReport | The regular report of the repository that needs to be opened. |
String | The path and name of the file, to which a regular report is exported (a file with the *.ppreport extension). |
The command can be used only for regular reports. A report can be opened for view and for edit. To view, specify the report in the Data property that is obtained by means of the Open (OpenWithParam) or Bind method, to edit, specify the report obtained by means of the Edit method.
To open a report from file, specify the full file path in the Data property. The report is opened for edit.
if the Data property is not set or additional execution parameters are not specified in the Execute method, a new regular report is created not connected to the repository.
Executing the example requires a form and a button named Button1 on the form. The repository contains a regular report with the Report_1 identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
Target := WinApplication.Instance.GetPluginTarget("Report");
Context := Target.CreateExecutionContext;
Context.Data := MB.ItemById("Report_1").Edit As IPrxReport;
Target.Execute("ShowReporter", Context);
End Sub Button1OnClick;
Clicking the button opens the specified regular report for edit.
Executing the example requires a form and a button named Button1 on the form.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Target: IUiCommandTarget;
Begin
MB := MetabaseClass.Active;
Target := WinApplication.Instance.GetPluginTarget("Report");
Target.Execute("ShowReporter", Null);
End Sub Button1OnClick;
Clicking the button creates a new regular report not connected to the repository. The report opens for edit.
Executing the example requires a form and a button named Button1 on the form. The root directory of the disk C includes an exported regular report with the "Report for January indicators.ppreport" name.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
Target := WinApplication.Instance.GetPluginTarget("Report");
Context := Target.CreateExecutionContext;
Context.Data := "c:\Report by January indicators.ppreport";
Target.Execute("ShowReporter", Context);
End Sub Button1OnClick;
Clicking the button opens the specified regular report for edit.
See also: