Show contents 

Express > Express Assembly Interfaces > IEaxDrillSettings > IEaxDrillSettings.Mode

IEaxDrillSettings.Mode

Syntax

Mode: EaxDataDrillMode;

Description

The Mode property determines selection modification mode in dimension elements detailing.

Comments

The property is set to EaxDataDrillMode.None by default.

Example

Executing the example requires that the repository contains a regular report with the REG_MODE identifier. Data source is a cube where calendar dimension is. The report contains one sheet, on which an analytical data area is created.

Add links to the Dimensions, Express, Metabase, Pivot, Report, Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Rep: IPrxReport;
    PivSlice: IEaxDataAreaPivotSlice;
    Pivot: IPivot;
    HeadSets: IDataAreaHeaderSettingsBase;
    Grid: IEaxGrid;
    DimSettings: IEaxGridDimensionSettings;
    PivotDims: IPivotDimension;
    DimModel: IDimensionModel;
    DimIndex: IDimIndex;
    Attributes: IDimAttributesInstance;
    Attribute: IDimAttribute;
    Drill: IEaxDrillSettings;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get regular report
    Rep := MB.ItemById("REG_MOVE").Edit As IPrxReport;
    // Get data slice as a report table data area
    PivSlice := Rep.DataArea.Slices.Item(0As IEaxDataAreaPivotSlice;
    // Get data table
    Pivot := PivSlice.Pivot;
    // Get calendar dimension
    PivotDims := Pivot.Dimensions.Item(1);
    // Get dimension structure
    DimModel := PivotDims.DimInstance.Dimension;
    // Get structure of the specified dimension index
    DimIndex := DimModel.Indexes.Item(0);
    // Get collection of dimension attributes
    Attributes := PivotDims.DimInstance.Attributes;
    // Get structure of the specified attribute
    Attribute := Attributes.Item(0).Attribute;
    // Get analytical data area header settings
    HeadSets := PivotDims As IDataAreaHeaderSettingsBase;
    // Enable territory info settings for the specified view
    Grid := (PivSlice As IEaxDataAreaSlice).Views.Item(0As IEaxGrid;
    Grid.ViewSettings.HyperlinkAsText := False;
    DimSettings := Grid.ViewSettings.GetViewSettings(HeadSets) As IEaxGridDimensionSettings;
    If Not DimSettings.IsDrilled Then
        DimSettings.Drilled := TriState.OnOption;
    End If;
    // Get territory info settings
    Drill := DimSettings.Drill;
    // Specify sheet
    Drill.SheetKey := Rep.Sheets.Item(0).Key;
    // Specify dimension
    Drill.Dimension := PivotDims;
    // Set method for changing selection - replacement
    Drill.Mode := EaxDataDrillMode.Replace;
    // Set index for element search
    Drill.DimensionIndex := DimIndex;
    // Set attribute of search in index
    Drill.DimensionAttribute := Attribute;
    Drill.DimensionAttributes := "BLOCK_TYPE";
    // On hyperlink click the system opens the specified website
    // URL opens in a new browser tab
    Drill.ActionType := TabHyperlinkActionType.OpenURL;
    Drill.Action := "www.example.com";
    Drill.Target := TabHyperlinkTarget.Top;
    // Display data slice key and dimension key in the console window
    Debug.WriteLine("Data slice key = " + Drill.SliceKey.ToString);
    Debug.WriteLine("Dimension key = " + Drill.DimensionKey.ToString);
    // Refresh report and save changes
    Rep.Recalc;
    (Rep As IMetabaseObject).Save;
End Sub UserProc;

After executing the example:

See also:

IEaxDrillSettings