IEaxAnalyzer.IsDimPinned

Fore Syntax

IsDimPinned(Source: Integer; DimKey: Integer;): Boolean;

Fore.NET Syntax

IsDimPinned(Source: Integer; DimKey: Integer;): Boolean;

Parameters

Source. The parameter determines source key.

DimKey. The parameter determines key of the source dimension.

Description

The IsDimPinned property determines whether the dimension is moved between private and fixed private dimensions.

Comments

When a general dimension is fixed in the source, it is divided into private dimensions, and the specified private dimension is fixed.

If the property is set to True, the dimension is transferred to fixed private dimensions from private ones.

If the property is set to False, the dimension is transferred to private dimensions from fixed private ones.

Use the IEaxAnalyzer.CanPinDim method to check where the dimension can be transferred.

Fore Example

Executing the example requires that the repository contains an express report with the Obj_1 identifier.

Add links to the Pivot, Express, Metabase, and Dimensions system assemblies.

Sub Main;
Var
    MB: IMetabase;
    Expr: IEaxAnalyzer;
    Pvt: IPivot;
    CompoundDim: IDimInstance;
    n: Boolean;
    Source: ICompoundDimensionSource;
    DimKey: Integer;
Begin
    MB := MetabaseClass.Active;
    Expr := MB.ItemById(
"OBJ_1").Edit As IEaxAnalyzer;
    Pvt := Expr.Pivot;
    
//Find private dimensions
    CompoundDim := Pvt.Selection.FindById("FACTS_COMPOUND").Dimension;
    
//Get the first source of private dimensions
    Source := (CompoundDim.Dimension As ICompoundDimension).Sources.Item(0);
    
//Get key of the private dimension
    DimKey := (Source.Dimensions.Item(0As IMetabaseObject).Key;
    debug.Write(
"Source key: ");
    debug.WriteLine(Source.Key);
    debug.Write(
"Key of the private dimension: ");
    debug.WriteLine(DimKey);
    
//Check whether the dimension can become a fixed private dimension, and move it if possible
    n := Expr.CanPinDim(Source.Key, DimKey, True);
    
If n = True Then
        Expr.IsDimPinned(Source.Key, DimKey) := 
True;
    
End If;
    
//Get dictionary key
    debug.Write("Key of the fixed private dimension: ");
    debug.WriteLine(Expr.PinDimension.ToString);
    
//Save the express report
   (Expr As IMetabaseObject).Save;
End Sub Main;

After executing the example the first private dimension in the express report is moved to fixed private dimensions. The console window displays source key, key of the private dimension, and key of the fixed private dimension.

Fore.NET Example

To execute the example, the repository must contain an express report with the Obj_1 identifier.

Add links to the Pivot, Express, Metabase, and Dimensions system assemblies.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Dimensions;
...
Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Expr: IEaxAnalyzer;
    Pvt: IPivot;
    CompoundDim: IDimInstance;
    n: Boolean;
    Source: ICompoundDimensionSource;
    DimKey: uinteger;
Begin
    MB := Params.Metabase;
    Expr := MB.ItemById[
"OBJ_1"].Edit() As IEaxAnalyzer;
    Pvt := Expr.Pivot;
    
//Find private dimensions
    Pvt.Selection.FindById["FACTS_COMPOUND"].Dimension;
    
//Get the first source of private dimensions
    Source := (CompoundDim.Dimension As ICompoundDimension).Sources.Item[0];
    
//Get key of the private dimension
    DimKey := (Source.Dimensions.Item[0As IMetabaseObject).Key;
    System.Diagnostics.Debug.Write(
"Source key: ");
    System.Diagnostics.Debug.WriteLine(Source.Key);
    System.Diagnostics.Debug.Write(
"Key of the private dimension: ");
    System.Diagnostics.Debug.WriteLine(DimKey);
    
//Check whether the dimension can become a fixed private dimension, and move it if possible
    n := Expr.CanPinDim(Source.Key, DimKey, True);
    
If n = True Then
        Expr.IsDimPinned[Source.Key, DimKey] := 
True;
    
End If;
    
//Get dictionary key
    System.Diagnostics.Debug.Write("Key of the fixed private dimension: ");
    System.Diagnostics.Debug.WriteLine(Expr.PinDimension);
    
//Save the express report
   (Expr As IMetabaseObject).Save();
    
End Sub;

After executing the example the first private dimension in the express report is moved to fixed private dimensions. The console window displays source key, key of the private dimension, and key of the fixed private dimension.

See also:

IEaxAnalyzer