Groff Automation Forum Index
Making software work for you
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in 

Log in to check your private messagesLog in to check your private messages   

Running Total based on Formula in Group Footer

 
Post new topic   Reply to topic    Groff Automation Forum Index -> Create/Modify
View previous topic :: View next topic  
Author Message
Crewdawg

Joined: 28 Oct 2005
Posts: 17
Location: Bangor, Maine
PostPosted: Fri Feb 24, 2006 5:02 pm    Post subject: Running Total based on Formula in Group Footer Reply with quote


I am using CR10 on a SQL2000 Server via OBDC.
I am creating a summary for a payroll report which summarizes total hours as well as how many of those hours were regular or overtime.

The report is grouped by Employee Code (as in Intials, also user name in DB). I have a running total which adds all of the hours that are applicable to that user code. I then use a fomrula to determine if the #RT is over 40 hours and if it is report 40 hours in Regular Hours column. Then anything over 40 is displayed in Overtime column.

I need to create a Running Total (or sum of) how many hours were regular and how many overtime for the Reoort Footer.

Here are my formulas. For some reason the totals do not add up.
Code:

//1Accum
whileprintingrecords;
numbervar reg1 := reg1 + {@1RegHours};
numbervar ot1 := ot1 + {@1OverHours};
numbervar reg2 := reg2 + {@2RegHours};
numbervar ot2 := ot2 + {@2OverHours};
numbervar totreg := totreg + {@ToTReg};
numbervar totot := totot + {@TotOT};

Code:

//1TotOT (All output formulas are the same except for appropriate variable names)
whileprintingrecords;
numbervar ot1;


Code:

                                Week 1                          Week 2                       Totals
FirstN    LastN       Hours    Regular    Overtime    Hours    Regular    Overtime    Total Reg    Total OT
Joe       Blow        42.15     40.00       2.15      42.15     40.00       2.15      80.00        4.30
Joe       Schmoe      39.45     39.45       0.00      39.45     39.45       0.00      79.30        0.00
------------------------------------------------------------------------------------------------------------------
                      82.00     79.45       2.15      82.00     79.45       2.15     159.30        4.30



The total containing the numbers (79.45, 2.15, 159.30, and 4.30) are all the ones passed through the variables and do not add up correctly.

Using this example:
(159.30 + 4.30 = 164.00)=(82.00 + 82.00 = 164.00)

In my report:
(8513.51 + 2533.24 = 11047.15) <> (5526.56 + 5864.54 = 11400.50)

For a difference of 353 Hours. +/- 3% Is to far off for a payroll report.

Any ideas as to why only these totals done through variables are incorrect?


I apologize for the mess.. this forum does not accept spaces well.
_________________
----------------------------------------------------
Multithreading is just one thing after, before, or simultaneous with another.
Back to top
View user's profile Send private message Visit poster's website
sybot_uk

Joined: 22 Nov 2007
Posts: 1
PostPosted: Thu Nov 22, 2007 3:26 am    Post subject: Reply with quote

Hi there, i'm not quite sure what you mean by the sums at the bottom. Where did the 82+82 come from?

One thing you could check for it your group selection. Do you have a formula in the group selection expert? If you do this could be the cause as (i think) any exlcuded groups may still be included in the sums. The same is true if you are using a suppression formula one of the groups.

Just a thought, maybe it will help.
Back to top
View user's profile Send private message
JamesJ

Joined: 17 Feb 2005
Posts: 133
PostPosted: Wed Nov 28, 2007 6:14 pm    Post subject: Reply with quote

Umm, if you'll notice, that message was posted over a year and a half ago. I doubt that he's still looking for help at this point. :-)

James
Back to top
View user's profile Send private message
djayatosu

Joined: 26 Nov 2007
Posts: 19
PostPosted: Thu Nov 29, 2007 3:51 pm    Post subject: Reply with quote

lol Smile
Back to top
View user's profile Send private message
Crewdawg

Joined: 28 Oct 2005
Posts: 17
Location: Bangor, Maine
PostPosted: Mon Dec 03, 2007 8:06 am    Post subject: Reply with quote

I am no longer watching this thread. To satisfy your curiosity the 82 came from the week 1 toatl plus week 2 total.
_________________
----------------------------------------------------
Multithreading is just one thing after, before, or simultaneous with another.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Groff Automation Forum Index -> Create/Modify All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You can delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron