Owner: IDataAreaHeaderStyleSettingsBase;
Owner: Prognoz.Platform.Interop.ForeSystem.IDataAreaHeaderStyleSettingsBase;
The Owner property returns the parent object of data area title formatting style settings.
To determine a key for connection with the parent object, use IDataAreaHeaderSettingsBase.SettingKey.
Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. A cube is a data source. The cube contains multidimensional dimensions.
Add links to the Dimensions, Express, Metabase, Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
DimLevel: IDimLevel;
PivotDim: IPivotDimension;
DimModel: IDimensionModel;
PivotDimLevel: IPivotDimensionLevel;
StyleSettings: IDataAreaHeaderStyleSettingsBase;
DAHeaderSettings: IDataAreaHeaderSettingsBase;
Owner: IDataAreaHeaderSettingsBase;
StOwner: IDataAreaHeaderStyleSettingsBase;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS_HEADERSETTINGS").Bind As IEaxAnalyzer;
// Get settings of data table display
Pivot := Express.Pivot;
// Get the first dimension
PivotDim := Pivot.Dimensions.Item(0);
// Get dimension structure
DimModel := PivotDim.DimInstance.Dimension;
// Get the first dimension level
DimLevel := DimModel.Levels.Item(0);
// Get table dimension level
PivotDimLevel := PivotDim.Levels.Item(DimLevel);
// Get style settings for data area title
StyleSettings := PivotDimLevel As IDataAreaHeaderStyleSettingsBase;
If StyleSettings = Null Then
Debug.WriteLine("The title does not contain style settings");
Else
// Display a key for connection to the console window
Debug.WriteLine
("A key for connection of title style settings with the parent object - "
+ StyleSettings.StyleSettingKey.ToString);
End If;
// Get the parent object of style settings
StOwner := StyleSettings.Owner;
If StOwner = Null Then
Debug.WriteLine("Title style settings do not contain the parent object");
Else
// Display a key for connection to the console window
Debug.WriteLine
("A key for connection of the parent object - " + StOwner.StyleSettingKey.ToString);
End If;
// Get data area title settings
DAHeaderSettings := PivotDim As IDataAreaHeaderSettingsBase;
If DAHeaderSettings = Null Then
Debug.WriteLine("Title does not contain settings");
Else
// Display a key for connection to the console window
Debug.WriteLine
("A key for connection of title settings with the parent object - "
+ DAHeaderSettings.SettingKey.ToString);
End If;
// Get the parent object of title settings
Owner := DAHeaderSettings.Owner;
If Owner = Null Then
Debug.WriteLine("Title settings do not have the parent object");
Else
// Display a key for connection to the console window
Debug.WriteLine
("A key for connection of the parent object - " + Owner.SettingKey.ToString);
End If;
End Sub UserProc;
After executing the example the console window displays keys for connection of title settings, title style in the data area.
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;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
DimLevel: IDimLevel;
PivotDim: IPivotDimension;
DimModel: IDimensionModel;
PivotDimLevel: IPivotDimensionLevel;
StyleSettings: IDataAreaHeaderStyleSettingsBase;
DAHeaderSettings: IDataAreaHeaderSettingsBase;
Owner: IDataAreaHeaderSettingsBase;
StOwner: IDataAreaHeaderStyleSettingsBase;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS_HEADERSETTINGS"].Bind() As IEaxAnalyzer;
// Get settings of data table display
Pivot := Express.Pivot;
// Get the first dimension
PivotDim := Pivot.Dimensions.Item[0];
// Get dimension structure
DimModel := PivotDim.DimInstance.Dimension;
// Get the first dimension level
DimLevel := DimModel.Levels.Item[0];
// Get table dimension level
PivotDimLevel := PivotDim.Levels.Item[DimLevel];
// Get style settings for data area title
StyleSettings := PivotDimLevel As IDataAreaHeaderStyleSettingsBase;
If StyleSettings = Null Then
System.Diagnostics.Debug.WriteLine("Title does not contain style settings");
Else
// Display a key for connection to the console window
System.Diagnostics.Debug.WriteLine
("A key for connection of title style settings with the parent object - "
+ StyleSettings.StyleSettingKey.ToString());
End If;
// Get the parent object of style settings
StOwner := StyleSettings.Owner;
If StOwner = Null Then
System.Diagnostics.Debug.WriteLine("Title style settings do not have the parent object");
Else
// Display a key for connection to the console window
System.Diagnostics.Debug.WriteLine
("A key for connection of the parent object - " + StOwner.StyleSettingKey.ToString());
End If;
// Get data area title settings
DAHeaderSettings := PivotDim As IDataAreaHeaderSettingsBase;
If DAHeaderSettings = Null Then
System.Diagnostics.Debug.WriteLine("Title does not contain settings");
Else
// Display a key for connection to the console window
System.Diagnostics.Debug.WriteLine
("A key for connection of title settings with the parent object - "
+ DAHeaderSettings.SettingKey.ToString());
End If;
// Get the parent object of title settings
Owner := DAHeaderSettings.Owner;
If Owner = Null Then
System.Diagnostics.Debug.WriteLine("Title settings do not have the parent object");
Else
// Display a key for connection to the console window
System.Diagnostics.Debug.WriteLine
("A key for connection of the parent object - " + Owner.SettingKey.ToString());
End If;
End Sub;
See also: