IExportRequestParams.FiltersSelectionSet

Syntax

FiltersSelectionSet: IDimSelectionSet;

Description

The FiltersSelectionSet property determines the selection of dictionaries, according to which factors are filtered in the export object.

Comments

If the time series database contains attributes referring to the repository dictionaries, the filtering of factors on export can be set up by elements of these dictionaries. To do this, include the selection of the dictionary in the collection of the FiltersSelectionSet property. Only the factors linked with the selected dictionary elements will be exported.

After executing and forming the selection of the dictionaries, reassign the values of the FiltersSelectionSet property.

Example

Executing the example requires that the repository contains a time series database with the TSBD identifier. An object with the EXPORT_TS identifier is created in the database. The structure of the database contains a mandatory attribute of the series with the COUNTRY identifier. This attribute refers to some dictionary of the repository.

Sub UserProc;
Var
    MB: IMetabase;
    Exporter: IExportRequestDefinition;
    ExportParams: IExportRequestParams;
    Filter: IDimSelectionSet;
    RubAttribute: IMetaAttribute;
    DictSelection: IDimSelection;
Begin
    MB := MetabaseClass.Active;
    Exporter := MB.ItemByIdNamespace("EXPORT_TS", MB.GetObjectKeyById("TSDB")).Edit As IExportRequestDefinition;
    ExportParams := Exporter.Exporter;
    Filter := ExportParams.FiltersSelectionSet;
    // Attribute, by which factors will be filtered
    RubAttribute := ExportParams.Rubricator.Facts.Attributes.FindById("COUNTRY");
    // Open the dictionary linked with attribute and add it to selection
    DictSelection := Filter.Add(RubAttribute.ValuesObject.Open(NullAs IDimInstance);
    // Select only the first element
    DictSelection.SelectElement(0False);
    ExportParams.FiltersSelectionSet := Null;
    (Exporter As IMetabaseObject).Save;
End Sub UserProc;

On executing the example the parameters of filtering factors in the export object will be changed. The export will be executed only by the first country created in the dictionary, with which the COUNTRY attribute is linked.

See also:

IExportRequestParams