I am writing a report for my client that has a grouping by Site and a grouping by Internal Program. I then have a running total that resets on the change of grouping Internal Program which counts the distinct member id values and displays them as a total for each group. Obviously, the running total field cannot just be summed up using a summary field. Here is some sample data and what the client expects:
Program 1 50
Program 2 48
Program 3 52
Program 4 50
Site total 200
However, if I insert another running total that resets on site and get a distinct count of the member id values for the entire site grouping, I might wind up with 145 instead of 200. The client wants 200, not 145.
How do I accomplish this? I am assuming I would use variables, but have never tackled that before. Any example code would be greatly appreciated. Thanks!