IEaxObject.Id

Fore Syntax

Id: String;

Fore.NET Syntax

Id: string;

Description

The Id property determines object identifier.

Comments

As identifier characters only Latin characters, numbers and the _ underscore can be used.

Fore Example

Executing the example requires that the repository contains a regular report with the REG_REPORT identifier. The report contains analytical data area.

Add links to the Express, Metabase, Report, Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Rep: IPrxReport;
    PivSlice: IEaxDataAreaSlice;
    GridObject: IEaxObject;
    Grid: IEaxGrid;
    Tab: IPrxTable;
    Sheet: ITabSheet;
    Range: ITabRange;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Rep := MB.ItemById("REG_REPORT").Edit As IPrxReport;
    // Get analytical data area slice
    PivSlice := Rep.DataArea.Slices.Item(0);
    // Create copy of data slice
    PivSlice.Copy(EaxSliceCopyOptions.All);
    // Get object to work with table
    GridObject := PivSlice.Views.Item(0As IEaxObject;
    // Change object identifier
    If GridObject.Id.IsEmpty Then
        GridObject.Id := "GridTab";
    End If;
    // Disable data saving to the source
    GridObject.AllowSaveData := False;
    // Create table copy
    Grid := PivSlice.Views.Item(0As IEaxGrid;
    Tab := Rep.Sheets.Item(0As IPrxTable;
    Sheet := Tab.TabSheet;
    Range := Sheet.ParseRange("A0:H6");
    Grid.Copy(Sheet, Range);
    // Save changes in express report
    (Rep As IMetabaseObject).Save;
End Sub UserProc;

After executing the example:

Fore.NET Example

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

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

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Rep: IPrxReport;
    PivSlice: IEaxDataAreaSlice;
    GridObject: IEaxObject;
    Grid: IEaxGrid;
    Tab: IPrxTable;
    Sheet: TabSheet;
    Range: ITabRange;
Begin
    // Get repository
    MB := Params.Metabase;
    // Get express report
    Rep := MB.ItemById["REG_REPORT"].Edit() As IPrxReport;
    // Get analytical data area slice
    PivSlice := Rep.DataArea.Slices.Item[0];
    // Create copy of data slice
    PivSlice.Copy(EaxSliceCopyOptions.escoAll);
    // Get object to work with table
    GridObject := PivSlice.Views.Item[0As IEaxObject;
    // Change object identifier
    If GridObject.Id.IsEmpty Then
        GridObject.Id := "GridTab";
    End If;
    // Disable data saving to the source
    GridObject.AllowSaveData := False;
    // Create table copy
    Grid := PivSlice.Views.Item[0As IEaxGrid;
    Tab := Rep.Sheets.Item[0As IPrxTable;
    Sheet := Tab.TabSheet;
    Range := Sheet.ParseRange("A0:H6");
    Grid.Copy(Sheet, Range);
    // Save changes in express report
    (Rep As IMetabaseObject).Save();
End Sub;

See also:

IEaxObject