General information
Category:
Reports & Report designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only