IncludeTotals: TriState;
The IncludeTotals property determines whether it is necessary to enable numbering for those rows and columns that contain totals data.
Numbering settings can be used to set number format and initial value; numbering starts with one by default.
Executing the example requires a regular report with the REGULAR_REPORT identifier, the report sheet contains a data area. Enable row numbering in data area properties on the Layout > Rows > Numbering tab. Add links to the Metabase, Report, Drawing, Dimensions, ForeSystem (for Fore.NET Example) system assemblies in the unit.
Sub UserProc;
Var
Mb: IMetabase;
Numb: IPrxDataIslandNumberingLevel;
DataIsl: IPrxDataIsland;
Rep: IPrxReport;
Header: IPrxDataIslandHeader;
Level: IPrxDataIslandLevel;
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 row heading parameters
Header := DataIsl.Properties.LeftHeader;
// Address the object that contains dimension of slice located in rows
DimModel := DataIsl.Slice.LeftHeader.Item(0).Dimension.Dimension;
// Determine parameters of slice dimension level
Prop := DataIsl.Properties;
PropDim := Prop.Dimension(DimModel);
Level := PropDim.Level(DimModel.Levels.Item(3));
// Determine numbering settings for level 4
Numb := Header.Numbering.Level(Level);
Numb.IsOn := True;
Numb.Style.BackgroundColor := GxColor.FromName("Yellow");
Numb.Type := PrxNumberingType.Hierarchical;
Numb.IncludeTotals := TriState.OnOption;
// 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 hierarchical type is set for the level 4 of row heading numbering, and background of cells with numbering is filled with yellow color. In general settings general numbering for all dimensions is enabled.
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;
Imports Prognoz.Platform.Interop.ForeSystem;
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
Numb: IPrxDataIslandNumberingLevel;
DataIsl: IPrxDataIsland;
Rep: IPrxReport;
Header: IPrxDataIslandHeader;
Level: IPrxDataIslandLevel;
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 row heading parameters
Header := DataIsl.Properties.LeftHeader;
// Address the object that contains dimension of slice located in rows
DimModel := DataIsl.Slice.LeftHeader.Item[0].Dimension.Dimension;
// Determine parameters of slice dimension level
Prop := DataIsl.Properties;
PropDim := Prop.Dimension[DimModel];
Level := PropDim.Level[DimModel.Levels.Item[3]];
// Determine numbering settings for level 4
Numb := Header.Numbering.Level[Level];
Numb.IsOn := True;
Numb.Style.BackgroundColor := GxColorCls.FromName("Yellow");
Numb.Type := PrxNumberingType.pnumtypHierarchical;
Numb.IncludeTotals := TriState.tsOnOption;
// 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: