on 04-21-2010 7:11 PM
Hi,
I am trying to create a running total that needs to evaluate on "Change of Group 3" and also filter results using a formula. My formula is {@GroupingName = 'Location'}, where I have multiple running total fields to calculate each location. How can I accomplish this? Can I write a formula that will allow me to evaluate on the change of group and also filter results by name. Thanks.
Edited by: AMD_GAMER on Apr 21, 2010 8:12 PM
use manual running totals- wizard is buggy sometimes
create 3 formulas
reset --- goes in group header
whileprintingrecords;
numbervar x := 0;
calc goes next to what is being calcualted
whileprintingrecords;
numbervar x := x + {field or formula};
display goes where you would like the value to show
whileprintingrecords;
numbervar x;
x
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the change of group is actually your reset formula
so you place that in the group header to reset the value to zero each time a new value or change of group comes up
the calc gets placed next to what is being calcualted
the display goes in the footer of where the reset is placed
if you need to total more than one group or field you need to create set of the 3 formulas for each
Thanks. I understand the logic of the formulas and the location of them in the report. However, I can't reset the value on grouping change, but actually it needs to "evaluate" on the change of service_ID. The service_ID is currently Group 3 in my report.
Ex:
Service ID 111 - Charge $100
Service ID 111 - Charge $100
Service ID 222 - Charge $200
The total would need to show $300, since I need to evaluate service_ID 111 for $100 and add that to the service_ID 222 for $200. Showing a total of $400 would be wrong. Its a very complex report that I am modifying to get totals by location.
it is not complex at all
create a group for service id
place your reset in the group header ( a group header display a unique value for each one it hits)
insert a section below that group now you have a 2nd group for service id
place the calc in there
place the display in the footer.
surpress the 2nd group and the reset formula and if you try it it works
I was able to get the running total to work, by "evaluate on formula" and using the following formula:
{vwGenSvcInfo.Location_Abbr} = 'LocationAbbreviation' and
Next({vwGenSvcInfo.Service_ID})<>{vwGenSvcInfo.Service_ID}
This code works for all groups except the last group. I am missing the very last record of that group. I am guessing this is occurring since it is the last record. How can I write the code to check if it is the last record and to make sure the amount is counted. The field that needs to be totaled is a formula called {@Chg Amt.}
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.