ITabRange.Combine

Syntax

Combine(Range: ITabRange; CombineMode: TabRangeCombineMode): ITabRange;

Parameters

Range. Current range of table elements.

CombineMode. Method that is used to change the current range.

Description

The Combine method changes the current range.

Comments

Depending on the value of the CombineMode parameter, the method creates or complements the current composite range, selected as an input parameter.

Example

Executing the example requires a form containing the Button component named Button1, the UiErAnalyzer component named UiErAnalyzer1 and the TabSheetBox component named TabSheetBox1. Set UiErAnalyzer1 as a data source for TabSheetBox1. An express report containing a table with data should be specified as the source for UiErAnalyzer1.

The procedure is the OnClick event handler for the Button1 button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Eax: IEaxAnalyzer;
    Grid: IEaxGrid;
    TR1: ITabRange;
    TR2: ITabRange;
Begin
    Eax := UiErAnalyzer1.ErAnalyzer;
    Grid := Eax.Grid;
    TR1 := Grid.TabSheet.ParseRange("B2:C2");
    TR2 := Grid.TabSheet.ParseRange("C2:D2");
    TR2 := TR2.Combine(TR1, TabRangeCombineMode.Xor_);
    Grid.KeepOnlyElements(TR2);
End Sub Button1OnClick;

Clicking the button leaves in the table the range obtained after aggregation of initial ranges excluding their crossing.

See also:

ITabRange