IEaxGrid.Range

Fore Syntax

Range: ITabRange;

Fore.NET Syntax

Range: Prognoz.Platform.Interop.Tab.ITabRange;

Description

The Range property returns range of the table rectangular area.

Comments

To determine parameters of table rectangular area, use IEaxGrid.OutPutRect.

Fore Example

Executing the example requires that the repository contains regular report with the REPORT identifier containing analytical data area.

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

Sub UserProc;
Var
    MB: IMetabase;
    Report: IPrxReport;
    PivSlice: IEaxDataAreaSlice;
    Grid: IEaxGrid;
    NOutputRect, OutputRect: IGxRect;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get regular report
    Report := MB.ItemById("REPORT").Edit As IPrxReport;
    // Get table
    PivSlice := Report.DataArea.Slices.Item(0);
    Grid := PivSlice.Views.Item(0As IEaxGrid;
    // Display to the console table cells range address
    Report.Recalc;
    Debug.WriteLine("Table cells range - " + Grid.Range.Address);
    // Get table  parameters
    OutputRect := Grid.OutputRect;
    // Create new table area
    NOutputRect := New GxRect.CreateFromRect(OutputRect);
    NOutputRect.Bottom := OutputRect.Bottom + 1;
    NOutputRect.Left := OutputRect.Left + 1;
    NOutputRect.Right := OutputRect.Right + 1;
    NOutputRect.Top := OutputRect.Top + 1;
    // Set new area for the table
    Grid.OutputRect := NOutputRect;
    // Refresh report
    Grid.Refresh;
    Report.Recalc;
    // Display to the console address of cells range of a new table area
    Debug.WriteLine("Address of cells range of a new table area - " + Grid.Range.Address);
    // Save changes
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example:

Fore.NET Example

The requirements and result of Fore.NET Example execution is the same as in the Fore Example.

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

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Report: IPrxReport;
    PivSlice: IEaxDataAreaSlice;
    Grid: IEaxGrid;
    NOutputRect, OutputRect: GxRect;
    Rect: GxRect = New GxRectClass();
Begin
    // Get repository
    MB := Params.Metabase;
    // Get regular report
    Report := MB.ItemById["REPORT"].Edit() As IPrxReport;
    // Get table
    PivSlice := Report.DataArea.Slices.Item[0];
    Grid := PivSlice.Views.Item[0As IEaxGrid;
    // Display to the console table cells range address
    Report.Recalc();
    System.Diagnostics.Debug.WriteLine("Table cells range - " + Grid.Range.Address);
    // Get table  parameters
    OutputRect := Grid.OutputRect;
    // Create new table area
    Rect.CreateFromRect(OutputRect);
    NOutputRect := Rect;
    NOutputRect.Bottom := OutputRect.Bottom + 1;
    NOutputRect.Left := OutputRect.Left + 1;
    NOutputRect.Right := OutputRect.Right + 1;
    NOutputRect.Top := OutputRect.Top + 1;
    // Set new area for the table
    Grid.OutputRect := NOutputRect;
    // Refresh report
    Grid.Refresh();
    Report.Recalc();
    // Display to the console address of cells range of a new table area
    System.Diagnostics.Debug.WriteLine("Address of cells range of a new table area - " + Grid.Range.Address);
    // Save changes
    (Report As IMetabaseObject).Save();
    End Sub;

See also:

IEaxGrid