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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need formual for Difference between Group Headers

Status
Not open for further replies.

arachnoid

Programmer
Jun 14, 2002
108
US
I am having problems keeping a list of the available hours. I have a series of tasks with different due dates. I also know how long it will take to complete each task. See the table below:

Task # Due Date Hours
-------- -------------- ----------
1 3/1/07 20
2 3/1/07 60
3 4/1/07 200
4 5/1/07 260

Since today is 2/8, I have 14 workdays until 3/1. At 8 hours per day, I have 112 hours to do work. The tasks due on that date will take 80 hours to complete. This leaves me 32 hours to do something else between now and 3/1.

The number of hours I have to work until task #3, due on 4/1 is 288 hours (36 work days). Since I have already allocated the hours between now and 3/1, I only have 176 (288-112) hours to complete the task due on 4/1. In addition, I have 32 extra hours that I didn't need for the tasks due on 3/1. This means that I have 208 (176+32) hours available for the task due on 4/1. After task number 3 is completed, I have 8 hours left to do something else (176+32-200).

The number of hours I have to work between now and 5/1 are 456. Since I have already allocated the hours between now and 4/1, I really only have 168 hours plus the 8 extra hours (176) (456-288+8) to get the task due on 5/1 completed. Since the task requires 260 hours, I am short 84 hours. Here is how the report would read with these calculations:

Task # Due Date Hours Hours Avail. Hours Needed Hours Extra (Short)
-------- -------------- ---------- ------------ ------------- -------------------
1 3/1/07 20
2 3/1/07 60 112 80 32
3 4/1/07 200 208 200 8
4 5/1/07 260 176 260 (84)

Note that the three calculation are only done before the date changes. If there are a number of tasks due on the same date, the calculation would only be done after the last one. The hours available are the extra (or short) hours added to the number of hours between the date and the one immediately above it.

We have tried many methods, but cannot get the available hours to calculate properly. If it's important, we are using version 11 of Crystal. Thanks in advance for your suggestions.
 
I think you'll need a separate running total, manually coded for each group.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top