IEaxGrid.DimRange

Fore Syntax

DimRange(DimKey: Integer; [LevelIndex: Integer = -1]): ITabRange;

Fore.NET Syntax

DimRange [DimKey: uinteger; LevelIndex: integer]: Prognoz.Platform.Interop.Tab.ITabRange;

Parameters

DimKey. Key of the dimension

LevelIndex. Dimension level.

Description

The DimRange property returns table cell range where elements of the dimension specified by key are shown.

Comments

Dimension level is ignored, if LevelIndex is set to -1.

To return table cells range where totals by columns or rows are displayed, use IEaxGrid.TotalsRange.

Fore Example

Executing the example requires express report with the EXPRESS identifier containing table with totals by columns interface. One of dimensions which is used to build table is a calendar dimension with the 10127 key.

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

Sub UserProc;
Var
    MB: IMetabase;
    Analyzer: IEaxAnalyzer;
    Grid: IEaxGrid;
    DimRange, TotalsRange: ITabRange;
Begin
    MB := MetabaseClass.Active;
    Analyzer := MB.ItemById("EXPRESS").Bind As IEaxAnalyzer;
    Grid := Analyzer.Grid;
    DimRange := Grid.DimRange(10127, -1);
    Debug.WriteLine
    ("Address of cells range where dimension elements are displayed - " + DimRange.Address);
    TotalsRange := Grid.TotalsRange(True);
    Debug.WriteLine
    ("Address of cells range where totals by columns are displayed - " + TotalsRange.Address);
End Sub UserProc;

After executing the example the console displays addresses of cells ranges where the following is displayed:

Fore.NET Example

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

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

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Analyzer: IEaxAnalyzer;
    Grid: IEaxGrid;
    DimRange, TotalsRange: ITabRange;
Begin
    MB := Params.Metabase;
    Analyzer := MB.ItemById["EXPRESS"].Bind() As IEaxAnalyzer;
    Grid := Analyzer.Grid;
    DimRange := Grid.DimRange[10127, -1];
    System.Diagnostics.Debug.WriteLine
    ("Address of cells range where dimension elements are displayed - " + DimRange.Address);
    TotalsRange := Grid.TotalsRange[True];
    System.Diagnostics.Debug.WriteLine
    ("Address of cells range where totals by columns are displayed - " + TotalsRange.Address);
End Sub;

See also:

IEaxGrid