FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Filtering in TwBrowse
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Filtering in TwBrowse
Posted: Mon Jun 04, 2007 02:49 PM

Hello,

I need to filter my data and show them in a TwBrowse.

Which is the best to do the filtering very fast ?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Filtering in TwBrowse
Posted: Mon Jun 04, 2007 08:42 PM

Scopes and conditional indexes.

EMG

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Filtering in TwBrowse
Posted: Tue Jun 05, 2007 12:14 AM

EnricoMaria, Thanks for you answer.

Can you give me an example of filtering by scopes ?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Filtering in TwBrowse
Posted: Tue Jun 05, 2007 06:56 AM
You must have an index on the key you want to scope:

USE TEST

INDEX ON FIELD -> last + FIELD -> first TO TEST

CLOSE


And then you can use it:

USE TEST INDEX TEST

SET SCOPE TO "F", "L "

GO TOP

BROWSE()

CLOSE


EMG
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Filtering in TwBrowse
Posted: Tue Jun 05, 2007 10:18 AM

EnricoMaria,

Thanks for your example.

Unfortunately, I got a syntax error on "SCOPE".

Is it standard procedure in xHarbour ?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Filtering in TwBrowse
Posted: Tue Jun 05, 2007 10:28 AM

Try using

include "Ord.ch"

or use the function instead of the command:

ORDSCOPE( 0, "F" )
ORDSCOPE( 1, "L " )

EMG

Continue the discussion