IEaxGrid.Range

Syntax

Range: ITabRange;

Description

The Range property returns range of the table rectangular area.

Comments

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

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:

See also:

IEaxGrid