IEaxDataAreaViews.Add

Syntax

Add(Value: IEaxObject): Boolean;

Parameters

Value. Object to work with view of analytical data area.

Description

The Add method adds existing object to work with view of analytical data area to the collection.

Comments

If view was created, the method returns True.

To remove object for working with analytical data area view by its index, use IEaxDataAreaViews.Remove.

Example

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:

See also:

IEaxDataAreaViews