GetFootnotesTransformations(Value: IDataAreaTransformationsGetter): IEaxDataAreaTransformations;
Value. The object for which collection of data transformation formulas will be obtained.
The GetFootnotesTransformations method returns collection of data transformation formulas that will be used to generate footnotes for dimension elements.
As the Value parameter value it is necessary to send any dimension of data source and cast it to the IDataAreaTransformationsGetter. 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.
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.
See also: