IPivotHighlightItem.ConditionType

Syntax

ConditionType: PivotHighlightType;

Description

The ConditionType property determines the condition type, by which highlighted data is selected.

Example No.1

Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. An express object is connected to the UiErAnalyzer1 component.

Add links to the Express, Pivot system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    OLAP: IEaxAnalyzer;
    Pivot: IPivot;
    Table: IPivotTable;
    HighItems: IPivotHighlightItems;
    HighItem: IPivotHighlightItem;
Begin
    OLAP := UiErAnalyzer1.ErAnalyzer;
    Pivot := OLAP.Pivot;
    Table := Pivot.ObtainTable;
    HighItems := Pivot.Highlight;
    HighItem := HighItems.Add;
    HighItem.ConditionType := PivotHighlightType.NLAandNGB;
    HighItem.ConditionValueA := 
100;
    HighItem.ConditionValueB := 
200;
    HighItem.Enabled := 
True;
    HighItem.Area := PivotFilterArea.Table;
    OLAP.Grid.ApplyHighlight(HighItem);
End Sub Button1OnClick;

After executing the example, clicking the button creates a new data highlighting condition in the express report table. Cells with values in the range [100,200] are highlighted in the entire table.

Example No.2

Executing the example requires a form, a button named Button1 this form, the ReportBox component, and the UiReport component named UiReport1 that is used as a data source for ReportBox. A regular report is connected to the UiReport1 component.

Add links to the Dimension, Drawing, Express, Pivot system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    OLAP: IEaxAnalyzer;
    Grid: IEaxGrid;
    Pivot: IPivot;
    Table: IPivotTable;
    HighItems: IPivotHighlightItems;
    HighItem: IPivotHighlightItem;
Begin
    Grid := UiReport1.Report.DataArea.Views.Item(
0As IEaxGrid;
    Pivot := Grid.Pivot;
    Pivot.BeginUpdate;
    Table := Pivot.ObtainTable;
    HighItems := Pivot.Highlight;
    HighItem := HighItems.Add;
    HighItem.ConditionType := PivotHighlightType.SelectionSet;
    
// Set selection of highlighted data
    HighItem.ConditionValueA := GetDimSelectionSet(Pivot);
    
// Set color
    HighItem.ConditionValueB := GxColor.FromKnownColor(GxKnownColor.Aquamarine);
    HighItem.Area := PivotFilterArea.Table;
    HighItem.Enabled := 
True;
    Pivot.EndUpdateEx(
False);
    Grid.ApplyHighlight(HighItem);
End Sub Button1OnClick;

Function GetDimSelectionSet(Pivot: IPivot): IDimSelectionSet;
Var
    DF: IDimSelectionSetFactory;
    DimSS, ResultSet: IDimSelectionSet;
    DimS: IDimSelection;
Begin
    DF := 
New DimSelectionSetFactory.Create;
    ResultSet := DF.CreateDimSelectionSet;
    DimSS := DF.CreateDimSelectionSet;
    Pivot.Selection.CopyTo(DimSS, 
TrueTrue);
    
For Each DimS In DimSS Do
        DimS.DeselectAll;
        Select Case DimS.Dimension.Ident
            
Case "FACTS": DimS.SelectElement(0False);
            
// Set selection by other dimensions
        End Select;
    
End For;
    ResultSet.AddCompound(
0, DimSS);
    
Return ResultSet;
End Function GetDimSelectionSet;

After executing the example, clicking the button creates a new data highlighting condition in the table regular report analytical area. Data will be highlighted according to the specified selection in the analytical area data source.

See also:

IPivotHighlightItem