IEaxDimensionProperties.Settings

Fore Syntax

Settings(Value: IDimHierarchyInstance): IEaxHierarchySettings;

Fore.NET Syntax

Settings[Value: Prognoz.Platform.Interop.Dimensions.IDimHierarchyInstance]: Prognoz.Platform.Interop.Express.IEaxHierarchySettings;

Parameters

Value. Alternative hierarchy.

Description

The Settings property determines settings of the specified alternative hierarchy.

Comments

To create settings, use the EaxHierarchySettings class.

Fore Example

Executing the example requires that a repository contains an express report with the EAX_DIMPROP identifier containing custom alternative hierarchy.

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

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Grid: IEaxGrid;
    Pivot: IPivot;
    PvtHeader: IPivotHeader;
    PvtDim: IPivotDimension;
    ViewSettings: IEaxGridViewSettings;
    HeaderProp: IEaxGridHeaderProperties;
    DimProp: IEaxDimensionProperties;
    Hier: IEaxDataAreaHierarchy;
    Sett: IEaxHierarchySettings;
    DimSel: IDimSelection;
    DimEl: String;
    CellStyle: IEaxDataAreaCellStyle;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EAX_DIMPROP").Edit As IEaxAnalyzer;
    // Get report data table
    Grid := Express.Grid;
    // Get display parameters of report data table
    ViewSettings := Grid.ViewSettings;
    // Get object basing on which data table is built
    Pivot := Grid.Pivot;
    // Get table sidehead
    PvtHeader := Pivot.LeftHeader;
    // Get the first dimension in the sidehead
    PvtDim := PvtHeader.PivotDim(0);
    // Get display settings of the first dimension in the sidehead
    HeaderProp := ViewSettings.GetViewSettings(PvtDim As IDataAreaHeaderSettingsBase);
    DimProp := HeaderProp As IEaxDimensionProperties;
    // Get alternative hierarchy
    Hier := Express.DataArea.Hierarchies.Item(0);
    // Get settings of alternative hierarchy
    Sett := DimProp.Settings(Hier.Hierarchy);
    // Change header alignment for the first element of alternative hierarchy
    DimSel := PvtDim.DimInstance.CreateSelection;
    DimSel.SelectAll;
    DimEl := DimSel.Dimension.Elements.Id(DimSel.Element(0));
    CellStyle := Sett.CellStyle(DimEl);
    CellStyle.Header.HorizontalAlignment := TabFormatAlignment.Center;
    // Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example header formatting is changed for the first element of alternative hierarchy.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.Tab;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Grid: IEaxGrid;
    Pivot: IPivot;
    PvtHeader: IPivotHeader;
    PvtDim: IPivotDimension;
    ViewSettings: IEaxGridViewSettings;
    HeaderProp: IEaxGridHeaderProperties;
    DimProp: IEaxDimensionProperties;
    Hier: IEaxDataAreaHierarchy;
    Sett: IEaxHierarchySettings;
    DimSel: IDimSelection;
    DimEl: String;
    CellStyle: IEaxDataAreaCellStyle;
Begin
    // Get current repository
    MB := Params.Metabase;
    // Get express report
    Express := MB.ItemById["EAX_DIMPROP"].Edit() As IEaxAnalyzer;
    // Get report data table
    Grid := Express.Grid;
    // Get display parameters of report data table
    ViewSettings := Grid.ViewSettings;
    // Get object basing on which data table is built
    Pivot := Grid.Pivot;
    // Get table sidehead
    PvtHeader := Pivot.LeftHeader;
    // Get the first dimension in the sidehead
    PvtDim := PvtHeader.PivotDim[0];
    // Get display settings of the first dimension in the sidehead
    HeaderProp := ViewSettings.GetViewSettings[PvtDim As IDataAreaHeaderSettingsBase];
    DimProp := HeaderProp As IEaxDimensionProperties;
    // Get alternative hierarchy
    Hier := Express.DataArea.Hierarchies.Item[0];
    // Get settings of alternative hierarchy
    Sett := DimProp.Settings[Hier.Hierarchy];
    // Change header alignment for the first element of alternative hierarchy
    DimSel := PvtDim.DimInstance.CreateSelection();
    DimSel.SelectAll();
    DimEl := DimSel.Dimension.Elements.Id[DimSel.Element[0]];
    CellStyle := Sett.CellStyle[DimEl];
    CellStyle.Header.HorizontalAlignment := TabFormatAlignment.tfaCenter;
    // Save changes
    (Express As IMetabaseObject).Save();
End Sub;

See also:

IEaxDimensionProperties