Re: TZF - Filters
Bob Watson <[email protected]> Wed, 3 Dec 2003 07:43:27 -0500
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Can you provide an example of your code?
The filter command looks like this:
TzDBF1.SetFilterTo(s:string);
To set three fields (say Name, Team, and BirthCity)
in a filter when the values I want are in variables
v1, v2, v3
I might do something like this
_________________________________
var
f:string;
s1,s2,s3:string;
s1:='Name="'+v1+'"; // You have to put the value of the
// variable inside of "
// and it takes a ' to do this
s2:='Team="'+v2+"';
s3:='BirthCity="'+v3+"'
f:=s1+' .AND. ' +s2+' .AND. '+s3;
// then set the filter with
TzDBF1.SetFilterTo(f);
// You can certainly do the above in fewer lines (maybe one) but when
// I do it in that way I always make a mistake.
_________________________________
AND, normally when I set a complex filter, it does not
work the first time and I have to tinker with it a little bit
HTH,
Bob
___________________________________
----- Original Message -----
From: "David Langley" <[email protected]>
To: <[email protected]>
Sent: Monday, December 01, 2003 5:42 PM
Subject: TZF - Filters
> I'm having a trouble time trying to SetFilterTo for a datafile using
> multiple vars derived from another datafile. I have to filter on at
> least three fields. All fields are of type char, so either I'm not doing
> something right in the filter itself, or going about it wrong. Any help
> is appreciated.. I've been away from Topaz for a while now
> :-)
>
> dgl-tts
>
> --^----------------------------------------------------------------
>
--^----------------------------------------------------------------
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
--^----------------------------------------------------------------