Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple filter builder screen
Message
De
20/10/2008 10:52:52
 
 
À
20/10/2008 00:13:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01355811
Message ID:
01355900
Vues:
20
VFP has several options for this out-of the box. I have used them all at various times, and they work pretty well.

You have (3) to choose from. Each is a class that you call from your form (perhaps in a command button on the form).

You would use the on an existing form that already has the data tables open, and perhaps even displayed in fields or grids or whatever. The you pop-up one of the filter classes to applly a filter, and off you go.

(1) Simple filter... class name: searchform class lib file: C:\Program Files\Microsoft Visual FoxPro 9\Wizards\wizstyle.vcx

(2) Advanced Filter... class name: _filterdialog class lib file: C:\Program Files\Microsoft Visual FoxPro 9\Ffc\_table.vcx

(3) Super-advanced.... class name: _filterexpr class lib file: C:\Program Files\Microsoft Visual FoxPro 9\Ffc\_table.vcx

The first two are combo-box driven based on the tables they find open.

The last one is a wide-open edit box that you type the filter just like you would in Foxpro code. Only a super-user would want this.


Code sample for (2) above:
  oSearch=createobject('_filterdialog')
  if type('oSearch')='O'
    oSearch.show(1)
    goto bottom
    thisform.refresh()
  else
   messagebox('Error creating object:  oSearch=createobject("searchform") in cmdFilter.click()', 0, 'Notice:')
  endif
That's it.

Be sure sure put SET CLASSLIB to C:\Program Files\Microsoft Visual FoxPro 9\Ffc\_table.vcx ADDITIVE in your startup proced code.
Also, just change the '_filterdialog' object name to which ever one you want to use, and add the classlib call to your startup code.


Good luck.



>I guess, free and ideally nice looking scx screen ( or class if you like ) which helps an application user to enter moderately simple filter condition that can be applied to a single table - should exist somewhere. Could you anyone help with the links ?
>
>TIA
>Michael
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform