• Post Reply Bookmark Topic Watch Topic
  • New Topic

Best Solution for Presenting Data  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1783
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a remote table of data that has a job number, start date, finish date, and hours scheduled to be spent. I have a report that shows job number as rows and 12 months as columns. What is the best way to iterate through the table data, break the time between start date and finish date into months, apply a value of hours(hours scheduled divided by number of months) for each of those months so this data can be shown in my report?
 
Bill Cruise
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hours scheduled divided by number of months


Is your report really that simple? What if the start date is on the last day of the month? Are you going to allocate the same number of hours for that month as all the others? What about allowing for weekends and (shudder) holidays?

I hate to answer a question with more questions so I will close by offering a few hints. You'd probably have a more accurate report if you step through each date in your range and decide if that's a valid work day. You can do this with Java's Date class, or even better with the Calendar class. Either of those will allow you to check the month, so you can add each work day to a monthly total.
 
Steve Dyke
Ranch Hand
Posts: 1783
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The portion of the report I am working on is to show projected hours by level loading a month matrix. Before I start I set any start dates to the first day of the month. The portion of the report that shows actual project scheduled hours is more like you suggested by alotting for weekends and holidays and actually calculates per day.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!