Express > Express Assembly Interfaces > IEaxGrid > IEaxGrid.Range
Range: ITabRange;
The Range property returns range of the table rectangular area.
To determine parameters of table rectangular area, use IEaxGrid.OutPutRect.
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(0) As 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:
In regular report of the table it moves on one cell to the right and to the button.
The console displays addresses of table cells ranges before new area settings and after it.
See also: