It opens a standard dialog box to work with cell attachments.
Command parameters are passed in the IUiCommandExecutionContext.Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
IEaxAttachmentsPluginContext | The context that determines, for which cell a dialog box opens. The context is created using the IEaxGrid.CreateAttachmentsPluginContext method. |
The command is applied for the table cell, which contains an analytical data area. The data source, on which an analytical data area is based, should have settings for working with attachments (IStandardCubeDestination.AttachmentsStorage).
The command results in the logical True if the Close button was clicked in the dialog box, and False if the dialog box was closed using the cross button in the header or using the ESC key.
Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. The data source for the express report has settings for working with attachments.
Add links to the Express, Metabase, Ui system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Eax: IEaxAnalyzer;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
EaxContext: IEaxAttachmentsPluginContext;
Grid: IEaxGrid;
Begin
MB := MetabaseClass.Active;
Eax := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
Target := WinApplication.Instance.GetPluginTarget("Report");
Context := Target.CreateExecutionContext;
Grid := Eax.Grid;
EaxContext := Eax.Grid.CreateAttachmentsPluginContext(5, 5);
Context.Data := EaxContext;
Target.Execute("ShowAttachmentsDialog", Context);
(Eax As IMetabaseObject).Save;
End Sub UserProc;
On executing the example, a dialog box for working with attachments opens for the specified cell. After finishing work with attachments, the express report is saved.
See also: