IEaxDataAreaSlice.GetFootnotesTransformations

Fore Syntax

GetFootnotesTransformations(Value: IDataAreaTransformationsGetter): IEaxDataAreaTransformations;

Fore.NET Syntax

GetFootnotesTransformations(Value: Prognoz.Platform.Interop.ForeSystem.IDataAreaTransformationsGetter): Prognoz.Platform.Interop.Express.IEaxDataAreaTransformations;

Parameters

Value. The object for which collection of data transformation formulas will be obtained.

Description

The GetFootnotesTransformations method returns collection of data transformation formulas that will be used to generate footnotes for dimension elements.

Comments

As the Value parameter value it is necessary to send any dimension of data source and cast it to the IDataAreaTransformationsGetter interface. Formula that will be determined in the expression of transformation formula will be used to generate footnotes text. Footnotes text is generated by the same formula for all dimension elements. In order that elements have different footnotes, the formula should return different values.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. There should a dimension with the COUNTRY identifier among source dimensions.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Slice: IEaxDataAreaSlice;
    Pivot: IPivot;
    Getter: IDataAreaTransformationsGetter;
    Trans: IEaxDataAreaTransformations;
    Tran: IEaxDataAreaTransformation;
    Item: IPivotDimension;
    SelSet: IDimSelectionSet;
    Sel: IDimSelection;
Begin
    MB := MetabaseClass.Active;
    Express := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    //Analytical data area slice
    Slice := Express.DataArea.Slices.Item(0);
    Pivot := Express.Pivot;
    //Dimension, for which footnotes are added
    Item := Pivot.Dimensions.FindByKey(MB.GetObjectKeyById("COUNTRY"));
    Getter := Item As IDataAreaTransformationsGetter;
    Trans := Slice.GetFootnotesTransformations(Getter);
    SelSet := Pivot.Selection.CreateCopy;
    For Each Sel In SelSet Do
        Sel.DeselectAll;
    End For;
    //Transformation formula for generating footnote text
    If Trans.Count > 0 Then
        Tran := Trans.Item(0);
    Else
        Tran := Trans.Add(SelSet, Null, -1);
    End If;
    Tran.Enabled := True;
    Tran.Expression.AsString := "{X.COUNTRY.NAME}";
    Pivot.Refresh;
    (Express As IMetabaseObject).Save;
End Sub UserProc;

On executing the example footnotes are set up in the specified express report for the COUNTRY dimension.The element names are used as footnotes text.

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.Metabase;
Imports Prognoz.Platform.Interop.Pivot;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Slice: IEaxDataAreaSlice;
    Pivot: IPivot;
    Getter: IDataAreaTransformationsGetter;
    Trans: IEaxDataAreaTransformations;
    Tran: IEaxDataAreaTransformation;
    Item: IPivotDimension;
    SelSet: IDimSelectionSet;
    Sel: IDimSelection;
Begin
    MB := Params.Metabase;
    Express := MB.ItemById["EXPRESS_REPORT"].Edit() As IEaxAnalyzer;
    //Analytical data area slice
    Slice := Express.DataArea.Slices.Item[0];
    Pivot := Express.Pivot;
    //Dimension, for which footnotes are added
    Item := Pivot.Dimensions.FindByKey(MB.GetObjectKeyById("COUNTRY"));
    Getter := Item As IDataAreaTransformationsGetter;
    Trans := Slice.GetFootnotesTransformations(Getter);
    SelSet := Pivot.Selection.CreateCopy();
    For Each Sel In SelSet Do
        Sel.DeselectAll();
    End For;
    //Transformation formula for generating footnote text
    If Trans.Count > 0 Then
        Tran := Trans.Item[0];
    Else
        Tran := Trans.Add(SelSet, Null, uinteger.MaxValue);
    End If;
    Tran.Enabled := True;
    Tran.Expression.AsString := "{X.COUNTRY.NAME}";
    Pivot.Refresh();
    (Express As IMetabaseObject).Save();
End Sub;

See also:

IEaxDataAreaSlice