Show contents 

Express > Express Assembly Interfaces > IEaxGrid > IEaxGrid.Range

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 a regular report with the REPORT identifier containing an 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 table cell range address in the console window
    Report.Recalc;
    Debug.WriteLine("Table cell range - " + Grid.Range.Address);
    // Get table parameters
    OutputRect := Grid.OutputRect;
    // Create a 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;
    // Assign a new area for table
    Grid.OutputRect := NOutputRect;
    // Refresh report
    Grid.Refresh;
    Report.Recalc;
    // Display cell range address of new table area in the console window
    Debug.WriteLine("Cell range address of new table area - " + Grid.Range.Address);
    // Save changes
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example:

See also:

IEaxGrid