ITabSheet.CreateColumnSearch

Syntax

CreateColumnSearch: ITabColumnSearch;

Description

The CreateColumnSearch method allows to create an object, searching for a table column.

Example

Sub Main;

Var

MB: IMetabase;

Rep: IPrxReport;

Tab: ITabSheet;

ColumnSearch: ITabColumnSearch;

Result: ITabSearchResult;

i: Integer;

Begin

MB := MetabaseClass.Active;

Rep := MB.ItemById("Reg_rep").Bind As IPrxReport;

Tab := (Rep.ActiveSheet As IPrxTable).TabSheet;

ColumnSearch := Tab.CreateColumnSearch;

ColumnSearch.AddCondition(0, "1", False, True);

ColumnSearch.AddCondition(1, "10", False, True);

Result := ColumnSearch.Execute;

If Result <> Null Then

i := Result.CurrentColumn;

End If;

End Sub Main;

As a result search for a column will be performed, which contains "1" in the first row, and "10" in the second row. If the search is successful, the "i" variable will contain the number of the found column.

See also:

ITabSheet