Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique counts - subtotals
Message
From
21/12/2000 20:26:30
 
 
To
20/12/2000 12:44:16
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00455221
Message ID:
00456149
Views:
33
Thanks Daniel, I've tried this technique, it all works, but it still just gives me total visits, not individual clients as the count.

Diana

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform