Hi,
I'm creating a report that pulls rolling numbers for each day during a given time frame and it's pulling this information for separate users and needs to be displayed per user.
Example:
User1 Calls/day "Should be" total Rolling Total (currently showing)
10/1/10 0 0 0
10/4/10 24 24 24
10/5/10 23 47 47
10/6/10 30 77 77
10/7/10 23 100 100
10/8/10 17 117 117
10/15/10 1 118 118
User2 (should reset here)
12/10/10 1 1 119
12/13/10 0 1 95
12/14/10 0 1 72
I need to figure out how to reset the Rolling Totals every time it hits a new username.
I'm using the following formula to generate the rolling numbers; it can also be found in this post
numbervar the_field := {@ActivityPoints};
numbervar array Accum;
numbervar Rolling_Period := 7;
if OnFirstRecord then
ReDim Accum [1]
else
ReDim Preserve Accum [UBound(Accum)+1];
Accum [UBound(Accum)] := the_field;
If UBound(Accum) <= Rolling_Period then
Sum(Accum)
Else
sum(Accum[(UBound(Accum) - (Rolling_Period-1)) to UBound(Accum)]);
I'm using Crystal Reports version 11.5.0.313.
Any help would be greatly appreciated!
I'm creating a report that pulls rolling numbers for each day during a given time frame and it's pulling this information for separate users and needs to be displayed per user.
Example:
User1 Calls/day "Should be" total Rolling Total (currently showing)
10/1/10 0 0 0
10/4/10 24 24 24
10/5/10 23 47 47
10/6/10 30 77 77
10/7/10 23 100 100
10/8/10 17 117 117
10/15/10 1 118 118
User2 (should reset here)
12/10/10 1 1 119
12/13/10 0 1 95
12/14/10 0 1 72
I need to figure out how to reset the Rolling Totals every time it hits a new username.
I'm using the following formula to generate the rolling numbers; it can also be found in this post
numbervar the_field := {@ActivityPoints};
numbervar array Accum;
numbervar Rolling_Period := 7;
if OnFirstRecord then
ReDim Accum [1]
else
ReDim Preserve Accum [UBound(Accum)+1];
Accum [UBound(Accum)] := the_field;
If UBound(Accum) <= Rolling_Period then
Sum(Accum)
Else
sum(Accum[(UBound(Accum) - (Rolling_Period-1)) to UBound(Accum)]);
I'm using Crystal Reports version 11.5.0.313.
Any help would be greatly appreciated!