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.

Fore 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Report;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    Numb: IPrxDataIslandNumberingLevel;
    DataIsl: IPrxDataIsland;
    Rep: IPrxReport;
    Header: IPrxDataIslandHeader;
    DimModel: IDimensionModel;
    Prop: IPrxDataIslandProperties;
    PropDim: IPrxDataIslandDimension;
    GxColorCls: GxColorClass = New GxColorClassClass();
Begin
    Mb := Params.Metabase;
    // 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 := GxColorCls.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;

See also:

Report Assembly Interfaces