IPivotFilterSettings.UseTransformationFilter

Fore Syntax

UseTransformationFilter: Boolean;

Fore.NET Syntax

UseTransformationFilter: boolean;

Description

The UseTransformationFilter property determines whether data filtering by formula is used.

Comments

Available values:

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:

Fore Example

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.

Fore.NET Example

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:

IPivotFilterSettings