Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Help! Running Total? Post Reply Post New Topic
Author Message
4milligans
Newbie
Newbie


Joined: 21 Jul 2009
Online Status: Offline
Posts: 8
Quote 4milligans Replybullet Topic: Help! Running Total?
    Posted: 02 Oct 2009 at 11:31am
I need help!  I only have maybe 2 hours a month to work on this report and I'm getting nowhere...fast!
 
I need to report Payroll hours to our Payroll dept.  Everything is set and working great....except - Overtime.  I report every two weeks, but Overtime is calculated on a 40 hour work week.  I need to figure out, how to extract each week individually to find out if the 40 hour requirement for OT has been met.  Right now my report is set up to calculate OT if department hours > 80 --  90% of the time this works fine, because most associates work 80 + hours in a pay period.  However, if someone works 79.99 hours - OT isn't calculated.....Any suggestions??  Anyone??
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 05 Oct 2009 at 7:10am
I'm for using shared variables, DBlank is for running totals.  From watching, the ideas are similar.  Since you are calculating for an individual, you would want a reset in there, but it would most likely be at where a 'week' is defined to start.  Regardless, the concept is the same, you know the data and the report...
 
in a group header usually, a reset
shared numbervar OT := 0;
""//hides the zero on the report
 
in a group footer, a display
shared numbervar OT
 
usually in the details, the incrementor
shared numbervar OT;
 
if hoursWorked > 40 then OT := OT + (hoursWorked - 40);
"" //hide the calculation (or remove to display/debug)
 
 
the tough part in the line above is how to define hoursWorked.
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

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



This page was generated in 0.008 seconds.