Add(Value: IEaxObject): Boolean;
Value. Object to work with view of analytical data area.
The Add method adds existing object to work with view of analytical data area to the collection.
If view was created, the method returns True.
To remove object for working with analytical data area view by its index, use IEaxDataAreaViews.Remove.
Executing the example requires that the repository contains a regular report with the REG_REPORT identifier containing an analytical data area.
Add links to the Express, Metabase and Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Grid: IEaxObject;
Views: IEaxDataAreaViews;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get regular report
Report := MB.ItemById("REG_REPORT").Edit As IPrxReport;
// Get table view
Views := Report.DataArea.Views;
Grid := Views.Item(0);
// Add a view to the collection
Views.Add(Grid);
// Display view's parent object identifier in the console window
Debug.WriteLine("View's parent object identifier - " + Views.Slice.Id);
// Save changes
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example in the regular report:
View of the analytical data area will be added to the collection.
Identifier of the view parent object will be displayed to the console.
See also: