IPrxDataIslandNumbering.Dimension

Syntax

Dimension: (Dimension: IPrxDataIslandDimension):IPrxDataIslandNumberingLevel;

Parameters

IPrxDataIslandDimension. The dimension of the data slice, on which the data area is built.

Description

The Dimension property returns numbering settings for a dimension.

Comments

Numbering settings can be used to set number format and initial value; numbering starts with one by default.

Example

Executing the example requires a regular report with the REGULAR_REPORT identifier, the report sheet contains a data area. Enable column numbering in data area properties on the Layout > Columns > Numbering tab. Add links to the Metabase, Report, Drawing, Dimensions system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Numb: IPrxDataIslandNumberingLevel;
    DataIsl: IPrxDataIsland;
    Rep: IPrxReport;
    Header: IPrxDataIslandHeader;
    DimModel: IDimensionModel;
    Prop: IPrxDataIslandProperties;
    PropDim: IPrxDataIslandDimension;
Begin
    Mb := MetabaseClass.Active;
    // Get regular report and address data area
    Rep := Mb.ItemById("REGULAR_REPORT").Edit As IPrxReport;
    DataIsl := Rep.DataIslands.Item(0).Edit;
    // Determine column heading parameters
    Header := DataIsl.Properties.TopHeader;
    // Address the object that contains dimension of the slice located in columns
    DimModel := DataIsl.Slice.TopHeader.Item(0).Dimension.Dimension;
    // Determine parameters of slice's dimension, on which data area is built
    Prop := DataIsl.Properties;
    PropDim := Prop.Dimension(DimModel);
    // Set cell background color in numbering settings for dimension
    Numb := Header.Numbering.Dimension(PropDim);
    Numb.Style.BackgroundColor := GxColor.FromName("Red");
    // Save changes made in data area and calculate report
    DataIsl.Save;
    Rep.Recalc;
    // Save changes in object structure
    (Rep As IMetabaseObject).Save;
End Sub UserProc;

In the regular report the cell background with column heading numbering is filled with red color.

See also:

Report Assembly Interfaces