UseTransformationFilter: Boolean;
UseTransformationFilter: boolean;
The UseTransformationFilter property determines whether data filtering by formula is used.
Available values:
True. Data filtering by formula is used.
False. Default. Data filtering by formula is not used.
To use the property, it is required that the IPivotFilterSettings.Enabled property is set to True.
If a formula contains parameter, the ":" character is put before the parameter. For example, a formula looks as follows: AttributeId >= :Parameter, where:
AttributeId. Dictionary attribute identifier.
:ParametrId. Report parameter identifier.
Executing the example requires that the repository contains an express report with the EXPRESS_FILTER identifier. Cube is a data source.
Add links to the Dal, Express, Metabase and Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Dim: IEaxDataAreaSlice;
Pivot: IPivot;
Cond: IEaxDataAreaTransformation;
Filter: IPivotFilterSettings;
Param: IMetabaseObjectParam;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS_FILTER").Edit As IEaxAnalyzer;
// Add parameter to report
Param := (Param As IMetabaseObject).Params.Add;
Param.DataType := DbDataType.Integer;
Param.Name := "ParamExp";
Param.DefaultValue := 2;
// Get table filtering settings
Pivot := Express.Pivot;
Filter := Pivot.Filter As IPivotFilterSettings;
// Set expression for filtering
Filter.UseTransformationFilter := True;
Dim := Express.DataArea.Slices.Item(0);
Cond := Dim.FilterTransformations.Item(0);
Cond.Expression.AsString := "Order>:ParamExp";
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example a new parameter is created in express report. Expression with using of this parameter is set for table.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Dim: IEaxDataAreaSlice;
Pivot: IPivot;
Cond: IEaxDataAreaTransformation;
Filter: IPivotFilterSettings;
Param: IMetabaseObjectParam;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS_FILTER"].Edit() As IEaxAnalyzer;
// Add parameter to report
Param := (Param As IMetabaseObject).Params.Add();
Param.DataType := DbDataType.ddtInteger;
Param.Name := "ParamExp";
Param.DefaultValue := 2;
// Get table filtering settings
Pivot := Express.Pivot;
Filter := Pivot.Filter As IPivotFilterSettings;
// Set expression for filtering
Filter.UseTransformationFilter := True;
Dim := Express.DataArea.Slices.Item[0];
Cond := Dim.FilterTransformations.Item[0];
Cond.Expression.AsString := "Order>:ParamExp";
// Save changes
(Express As IMetabaseObject).Save();
End Sub;
See also: