Filtering in TwBrowse

Filtering in TwBrowse

Postby driessen » Mon Jun 04, 2007 2: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Filtering in TwBrowse

Postby Enrico Maria Giordano » Mon Jun 04, 2007 8:42 pm

Scopes and conditional indexes.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Enrico Maria Giordano » Tue Jun 05, 2007 6:56 am

You must have an index on the key you want to scope:

Code: Select all  Expand view
USE TEST

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

CLOSE


And then you can use it:

Code: Select all  Expand view
USE TEST INDEX TEST

SET SCOPE TO "F", "L "

GO TOP

BROWSE()

CLOSE


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Enrico Maria Giordano » 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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests