Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I include my own filter along with SFReports?
Message
De
11/10/2000 14:05:35
 
 
À
11/10/2000 13:55:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Divers
Thread ID:
00427860
Message ID:
00427973
Vues:
13
>Hi Sandi.
>
>>I have a screen that I want to always filter a particular set of records, but allow the user to add more filtering if necessary. I tried adding the rest of the filter to the Filter button on my screen, but it didn't work.
>>
>>in my Click method on the button
>>
>>.oQuery.cFilter = 'BKCHECK.Posted AND ' + .oQuery.CFilter
>
>SFQuery's cFilter property is overwritten by whatever conditions the user enters. Instead, do it like this:
.oQuery.Show()
>lcFilter = 'BKCHECK.Posted' + iif(empty(.oQuery.cFilter), '', ;
>    ' AND (' + .oQuery.cFilter + ')')
>set filter to &lcFilter
The reason this code adds ( ) around .oQuery.cFilter is that the user might enter a couple of conditions with an OR between them, so ( ) helps keep the precedence of the operators correct.
>
>Doug


**** Thanks that worked wonderfully!.

Sandi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform