Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Total Issue

Status
Not open for further replies.
Dec 11, 2009
60
US
I have a running total I created based on the following formula:

IF {Command.paycodedesc} in ['Regular Hours', 'Overtime 1', 'Overtime 2', 'Overtime 3']
then {Command.ytdpay}
ELSE 0

Here is the data being pulled:

WeekEnding: 3/27/10
Name Desc Units YTDPay
Company1 OT 1 909.30
Company1 Reg 40 6437.50

WeekEnding: 4/03/10
Name Desc Units YTDPay
Company1 Reg 40 6437.50

My running total is summing ytdpay ,
Evlauate on change of ytdpay,
Reset on change of @weekending group

I created the formula above because some times there is Expenses during a given week, but I don't want those included in the sum.

With the above data, my running total is coming back blank and I am thinking it is because there isn't the same number of values for each weekending, therefore in the 2nd weekending reading OT as 'zero' and not displaying the data at all? The correct amount that I need to return is the sum of (909.30+6437.50)....

Any suggestion will be greatly appreciated!!!!


 
Is it blank for both weeks or only for the second week? Where are you placing the running total? It should be in the weekending group footer, not header.

-LB
 
Have you copied the RT to the detail section to see if it is evaluating at all? I would think think you would want to evaluate on all records. I am assuming that the formula is called ytdpay.
 
kray4660--I think you're onto something. That may be the issue.

-LB
 
If I place the running total in the detail section it populates for the first weekend, but nothing is returned for the second weekending.

The running total is placed in my report footer section because that is where my totals are; could that be the issue?
 
Even if I change it to evaluate on all records, it is not adding the 2 lines together, it only returns the 6437.50?
 
If you are resetting on change of group, then the running total must be in the group footer, not the report footer. If you want a total in the report footer, change the reset to: never.

Is the ytdpay already calculated? If so, if there IS only one company on the report, you could evaluate on change of ytdpay. However, if you are looking for the most recent YTD total in the report footer, you could just place the ytdpay field in the footer, or you could just insert a maximum on it--again assuming there is only one company in the report or that you are calculating ytdpay across companies.

-LB
 
Okay, I will give that a try. Yes the YTD field is already a calculated field in the table. That is why it is showing multiple times depending on the description. No matter how many times it shows, I only need it to calculate once?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top