Some of you folks who write reports for Microsoft Project Server have experienced this frustrating issue, where for some of your resources, hours they have entered into their timesheet are showing as multiples in your report result set. Why is this, as it seems it’s randomly occurring?
For those who’ve not figured it out yet, I’ll fill you in. In the MSP_TimesheetActual table (Reporting Database, for 2010 users), there’s a field called Adjustment Index. When this field gets incremented (explanation saved for a subsequent post) your result set will include more than one line per single timesheet entry. See sample data below.
If you’re summing your records, the above data will show a total of 4 hours submitted, rather than 2.
To get around this, simply insert the following code into your SQL. If you’re using a table alias in your script other than “ta” for table MSP_TimesheetActual, adjust the script below as necessary.
— Added to correct duplicates – Display only the top level adjustment
and ta.AdjustmentIndex =
from MSP_TimesheetActual tma2
where ta.TimesheetLineUID = tma2.TimesheetlineUID
and ta.TimeByDay = tma2.TimeByDay)