IEaxDataAreaViews.Add

Fore Syntax

Add(Value: IEaxObject): Boolean;

Fore.NET Syntax

Add(Value: Prognoz.Platform.Interop.Express.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 to work with views of analytical data area by its index, use IEaxDataAreaViews.Remove.

Fore Example

Executing the example requires that the repository contains regular report with the REG_REPORT identifier containing 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 view to the collection
    Views.Add(Grid);
    // Display to the console identifier of view parent object
    Debug.WriteLine("Identifier of views parent object- " + Views.Slice.Id);
    // Save changes
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example in the regular report:

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Report;

Public
 Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Report: IPrxReport;
    Grid: IEaxObject;
    Views: IEaxDataAreaViews;
Begin
    // Get repository
    MB := Params.Metabase;
    // Get regular report
    Report := MB.ItemById["REG_REPORT"].Edit() As IPrxReport;
    // Get table view
    Views := Report.DataArea.Views;
    Grid := Views.Item[0];
    // Add view to the collection
    Views.Add(Grid);
    // Display to the console identifier of view parent object
    System.Diagnostics.Debug.WriteLine
    ("View parent object identifier - " + Views.Slice.Id);
    // Save changes
    (Report As IMetabaseObject).Save();
End Sub;

See also:

IEaxDataAreaViews