Settings: IPivotDimensionSettingsEx;
Settings: Prognoz.Platform.Interop.Pivot.IPivotDimensionSettingsEx;
The Settings property returns table dimension settings.
The settings store:
Dimension data filtering settings.
Settings for working with leaf elements.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. Report must contain a table.
Add links to the Express, Metabase and Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Dim: IPivotDimension;
Settings: IPivotDimensionSettingsEx;
Filter: IPivotDimensionFilterSettings;
Cond: IExpression;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get display settings of report data table
Pivot := Express.Pivot;
// Get dimension from collection
Dim := Pivot.Dimensions.Item(0);
// Get dimension settings
Settings := Dim.Settings;
// Get dimension filtering settings
Filter := Settings.Filter;
// Get expression
Cond := Filter.Condition;
If Not Cond.Empty Then
Debug.WriteLine("Expression is not set") Else
Debug.WriteLine("Expression - " + Cond.AsString);
End If;
// Display only leaf dimension elements
If Not Settings.IsLeafElementsOnly Then
Settings.LeafElementsOnly := TriState.OnOption;
End If;
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the table displays only the elements that do not have selected child elements.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
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;
Dim: IPivotDimension;
Settings: IPivotDimensionSettingsEx;
Filter: IPivotDimensionFilterSettings;
Cond: IExpression;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
// Get display settings of report data table
Pivot := Express.Pivot;
// Get dimension from collection
Dim := Pivot.Dimensions.Item[0];
// Get dimension settings
Settings := Dim.Settings;
// Get dimension filtering settings
Filter := Settings.Filter;
// Get expression
Cond := Filter.Condition;
If Not Cond.Empty Then
System.Diagnostics.Debug.WriteLine("Expression is not set") Else
System.Diagnostics.Debug.WriteLine("Expression - " + Cond.AsString);
End If;
// Display only leaf dimension elements
If Not Settings.IsLeafElementsOnly Then
Settings.LeafElementsOnly := TriState.tsOnOption;
End If;
// Save changes
(Express As IMetabaseObject).Save();
End Sub;
See also: