IEaxSheets.Add

Fore Syntax

Add(Value: IEaxAnalyzer): IEaxSheet;

Fore.NET Syntax

Add(Value: Prognoz.Platform.Interop.Express.EaxAnalyzer): Prognoz.Platform.Interop.Express.IEaxSheet;

Parameters

Value. Express report that is the basis to create a sheet.

Description

The Add method creates the sheet that is based on the current express report.

Comments

The child object is added when performing the Add method for the source express. The child object is the copy of the express report, passed by the Value parameter.

 Fore Example

Executing the example requires two express reports with the EXPRESS_REPORT, EXPRESS_REPORT_2 identifiers and a cube with the Cube_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    Eax: IEaxAnalyzer;
    Sheet: IEaxSheet;
    CubeInst: ICubeInstance;
Begin
    MB := MetabaseClass.Active;
    Eax := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    //Creating a sheet based on current express report
    Eax.Sheets.Add(MB.ItemById("EXPRESS_REPORT_2").Bind As IEaxAnalyzer);
    //Creating a sheet based on a new express report
    Sheet := Eax.Sheets.AddNew;
    //Specifying the source for a new sheet
    CubeInst := MB.ItemById("Cube_1").Open(NullAs ICubeInstance;
    Sheet.Analyzer.OpenCube(CubeInst);
    (Eax As IMetabaseObject).Save;
End Sub UserProc;

Two sheets are created in the EXPRESS_REPORT express report when the sample is performed. The first sheet is based on the current EXPRESS_REPORT_2 express report, the second is based on the new express report with the Cube_1 cube as the source.

 Fore.NET Example

Executing the example requires two express reports with the EXPRESS_REPORT, EXPRESS_REPORT_2 identifiers and a cube with the Cube_1 identifier. Selected procedure is an entry point for the .NET assembly.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Eax: IEaxAnalyzer;
    Sheet: IEaxSheet;
    CubeInst: ICubeInstance;
Begin
    MB := Params.Metabase;
    Eax := MB.ItemById["EXPRESS_REPORT"].Edit() As IEaxAnalyzer;
    //Creating a sheet based on current express report
    Eax.Sheets.Add(MB.ItemById["EXPRESS_REPORT_2"].Bind() As EaxAnalyzer);
    //Creating a sheet based on a new express report
    Sheet := Eax.Sheets.AddNew();
    //Specifying the source for a new sheet
    CubeInst := MB.ItemById["Cube_1"].Open(NullAs ICubeInstance;
    Sheet.Analyzer.OpenCube(CubeInst);
    (Eax As IMetabaseObject).Save();
End Sub;

Two sheets are created in the EXPRESS_REPORT express report when the sample is performed. The first sheet is based on the current EXPRESS_REPORT_2 express report, the second is based on the new express report with the Cube_1 cube as the source.

See also:

IEaxSheets