Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to display subsets of data
Message
De
26/07/2001 15:38:13
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, États-Unis
 
 
À
25/07/2001 02:27:05
Jill Derickson
Software Specialties
Saipan, CNMI
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00534821
Message ID:
00535994
Vues:
10
You could use 2 params in a view. These would become the 'between' dates in the view filter. Your table would have a 'date completed' field that would have to be set somehow once the app was completed.
e.g.

create sql view lv_apps as ;
select * from apps ;
where between(apps.comp_date,?date1,?date2)

option 1 && completed
date1 = {01/01/1900} && unless you have apps older than that
date2 = date()

option 2 && not completed
date1 = {}
date2 = {}

option 3 && all
date1 = {}
date2 = date()

=requery...

John


>Hi all,
>
>I have a number of tables that has information about applications (people applying to receive benefits from a program).
>
>I will be using a view (or mulitple views) to display the data in a grid. I want to give my users the options of displaying:
> - all applications
> - completed applications
> - incomplete applications
>
>What is the best way to handle this? once the size of the data gets large, Filter's are not efficient, right? I could have 3 different views and change the RecordSource for each.
>
>I've thought about somehow having a view parameter that will collect the entries required, but don't quite know how to handle this. If the main table has a field, lCompleted, obviously, I can query for all completed applications or all uncompleted applications, w/something like:
>
>... WHERE lCompleted = ?Thisform.lShowCompleted
>
>But how to expand that to query for all applications? this might be totally obvious, but I can't see it.
>
>Thanks for any input. J
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform