Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique counts - subtotals
Message
De
20/12/2000 12:44:16
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00455221
Message ID:
00455487
Vues:
51
Diana:

First, add an AgeFlag field (for example: infant = 0, child = 1, adult = 2, senior = 3) because an individual can have a birthday between visists.

Now, assuming the data is ordered by Primary Insurance + AgeFlag + ID + Visit Date, then you can use groups on your report (Primary Insurance, AgeFlag, ID) and use a report variable to count the number of distinct visitors.

For example, add these report variable in order:

mCount
*Original value = 0
*Store = IIF(PI <> mPI or AF <> mAF or AF, mCount + 1, mCount)

mPI
*Original value = "##"
*Store = PI

mAF
*Original value = "##"
*Store = AF

mID
*Original value = "##"
*Store = ID

where PI is primary insurance, AF is age flag. The order of the variables in report variables is very important.

Having said all this, I agree with Nadya that it is best practice to do these calculations outside of the report form. The trick above works well but it's hard to maintain in a team environment.

Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform