Reporting Publish
** updated with links to other related discussions, and a VBA macro **
the following issue has been noted on publish since June 13 CU was applied:
ReportingProjectChangeMessageFailed (24006) - Object reference not set to an instance of an object.. Details: id='24006' name='ReportingProjectChangeMessageFailed' uid='4d869e56-f625-e311-bb41-005056b90052' QueueMessageBody='Project UID='e3f49977-b2bc-e211-8559-005056b90052'. PublishType='ProjectPublish'' Error='Object reference not set to an instance of an object.'.
I have seen this noted previously on a similar issue:
http://nearbaseline.com/blog/2013/06/ms-reporting-project-publish-jobs-failed-after-aprilcu/comment-page-1/#comment-14741
This is caused by Baselined Milestones having NULL Baseline Cost values
The following macro (from MS) is designed to resolve this:
'DISCLAIMER OF WARRANTY
'
'THIS FIX CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
'MICROSOFT FURTHER DISCLAIMS ALL IMPLIED WARRANTIES INCLUDING WITHOUT
'LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR OF FITNESS
'FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF THE USE OR
'PERFORMANCE OF THE CODE REMAINS WITH YOU.
'
'IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES
'WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
'BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION,
'OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE
'THIS MACRO, EVEN IF MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF
'SUCH DAMAGES. BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR
'LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE
'ABOVE LIMITATION MAY NOT APPLY TO YOU.
'This macro attempts to work around the reporting publish failure that occurs when there are tasks
'with baselines and where the BaselineCost contour is NULL. The symptoms that you see in the queue
'for the "Reporting (Project Publish)" job has details similar to:
'
'
'
'uid="c72e20a7-9b7f-487b-9da2-19460b2e6c32"
'QueueMessageBody="Project UID='8e074f24-1064-47dd-bce5-c2dad8d556c8'.
'PublishType='ProjectPublish'" Error="Object reference not set to an instance of an object." />
'This code simply walks through the tasks in the tasks in the project and if there are
'baseline(s) set, then the code sets a time scaled baseline cost = 0 on the day prior to
'where the baseline start is scheduled. This sets the baseline contour so that the
'"Object reference not set to an instance of an object" problem can be overcome during the
'reporting publish job.
Sub FixPublish()
Dim t As Tasks
Dim tsv As TimeScaleValues
Dim i As Long
Dim bCalc As Boolean
On Error Resume Next
'get the current application calculation state
bCalc = Application.Calculation
'set calculation to manual (helps with performance while the code runs)
Application.Calculation = pjManual
Set t = ActiveProject.Tasks
'walk through the tasks in the project. If a task as a baseline(s) then set a timescaled baselinecost = 0
For i = 1 To t.Count
If Not t(i) Is Nothing Then
If t(i).BaselineStart <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).BaselineStart - 1, t(i).BaselineStart - 1, pjTaskTimescaledBaselineCost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline1Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline1Start - 1, t(i).Baseline1Start - 1, pjTaskTimescaledBaseline1Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline2Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline2Start - 1, t(i).Baseline2Start - 1, pjTaskTimescaledBaseline2Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline3Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline3Start - 1, t(i).Baseline3Start - 1, pjTaskTimescaledBaseline3Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline4Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline4Start - 1, t(i).Baseline4Start - 1, pjTaskTimescaledBaseline4Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline5Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline5Start - 1, t(i).Baseline5Start - 1, pjTaskTimescaledBaseline5Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline6Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline6Start - 1, t(i).Baseline6Start - 1, pjTaskTimescaledBaseline6Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline7Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline7Start - 1, t(i).Baseline7Start - 1, pjTaskTimescaledBaseline7Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline8Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline8Start - 1, t(i).Baseline8Start - 1, pjTaskTimescaledBaseline8Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline9Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline9Start - 1, t(i).Baseline9Start - 1, pjTaskTimescaledBaseline9Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline10Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline10Start - 1, t(i).Baseline10Start - 1, pjTaskTimescaledBaseline10Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
End If
Next
'fix the project summary task
With ActiveProject.ProjectSummaryTask
If .BaselineStart <> "NA" Then
Set tsv = .TimeScaleData(.BaselineStart - 1, .BaselineStart - 1, pjTaskTimescaledBaselineCost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline1Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline1Start - 1, .Baseline1Start - 1, pjTaskTimescaledBaseline1Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline2Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline2Start - 1, .Baseline2Start - 1, pjTaskTimescaledBaseline2Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline3Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline3Start - 1, .Baseline3Start - 1, pjTaskTimescaledBaseline3Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline4Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline4Start - 1, .Baseline4Start - 1, pjTaskTimescaledBaseline4Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline5Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline5Start - 1, .Baseline5Start - 1, pjTaskTimescaledBaseline5Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline6Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline6Start - 1, .Baseline6Start - 1, pjTaskTimescaledBaseline6Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline7Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline7Start - 1, .Baseline7Start - 1, pjTaskTimescaledBaseline7Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline8Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline8Start - 1, .Baseline8Start - 1, pjTaskTimescaledBaseline8Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline9Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline9Start - 1, .Baseline9Start - 1, pjTaskTimescaledBaseline9Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline10Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline10Start - 1, .Baseline10Start - 1, pjTaskTimescaledBaseline10Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
End With
'set the application calculation state back the way it was
Application.Calculation = bCalc
End Sub
Timesheets created without Admin tasks
Here's another thats not been reproduced yet, but I am receiving notifications from a customer that some users are seeing their timesheets created without Admin Tasks
Now there was an issue with this under delegation from 2010 days (2010 - http://support.microsoft.com/kb/2553504 ) but again I have been unable to reproduce as of yet.
to isolate and resolve the issue I ran the following once the issue had occurred. This doesnt repro the problem.
I delegated as user
opened timesheet and submitted
at this point i noted the error but also saw that the timesheet did submit
Recalled and deleted timesheet (taking note of actual hours logged for reference)
Recreated timesheet and got the following error:
"the timesheet creation failed because of problems with the project web app or with data validations"
Noted that Admin Tasks had not been added to the timesheet
Manually added these
Submitted timesheet
no issue noted
** updated with links to other related discussions, and a VBA macro **
the following issue has been noted on publish since June 13 CU was applied:
ReportingProjectChangeMessageFailed (24006) - Object reference not set to an instance of an object.. Details: id='24006' name='ReportingProjectChangeMessageFailed' uid='4d869e56-f625-e311-bb41-005056b90052' QueueMessageBody='Project UID='e3f49977-b2bc-e211-8559-005056b90052'. PublishType='ProjectPublish'' Error='Object reference not set to an instance of an object.'.
I have seen this noted previously on a similar issue:
http://nearbaseline.com/blog/2013/06/ms-reporting-project-publish-jobs-failed-after-aprilcu/comment-page-1/#comment-14741
This is caused by Baselined Milestones having NULL Baseline Cost values
Original bug note with potential workaround is here:
Looks like a fix is slated for October CU which is likely 3-4 weeks away
(http://social.technet.microsoft.com/Forums/projectserver/en-US/69d5882d-82aa-4e1f-ab9f-b3a7182dc5be/msps2013-april-cu-2013-cant-publish-projects-with-baseline)
(http://social.technet.microsoft.com/Forums/projectserver/en-US/69d5882d-82aa-4e1f-ab9f-b3a7182dc5be/msps2013-april-cu-2013-cant-publish-projects-with-baseline)
The following macro (from MS) is designed to resolve this:
NOTE: I am providing NO warranty for this!
'DISCLAIMER OF WARRANTY
'
'THIS FIX CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
'MICROSOFT FURTHER DISCLAIMS ALL IMPLIED WARRANTIES INCLUDING WITHOUT
'LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR OF FITNESS
'FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF THE USE OR
'PERFORMANCE OF THE CODE REMAINS WITH YOU.
'
'IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES
'WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
'BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION,
'OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE
'THIS MACRO, EVEN IF MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF
'SUCH DAMAGES. BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR
'LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE
'ABOVE LIMITATION MAY NOT APPLY TO YOU.
'This macro attempts to work around the reporting publish failure that occurs when there are tasks
'with baselines and where the BaselineCost contour is NULL. The symptoms that you see in the queue
'for the "Reporting (Project Publish)" job has details similar to:
'
'
'
'uid="c72e20a7-9b7f-487b-9da2-19460b2e6c32"
'QueueMessageBody="Project UID='8e074f24-1064-47dd-bce5-c2dad8d556c8'.
'PublishType='ProjectPublish'" Error="Object reference not set to an instance of an object." />
'This code simply walks through the tasks in the tasks in the project and if there are
'baseline(s) set, then the code sets a time scaled baseline cost = 0 on the day prior to
'where the baseline start is scheduled. This sets the baseline contour so that the
'"Object reference not set to an instance of an object" problem can be overcome during the
'reporting publish job.
Sub FixPublish()
Dim t As Tasks
Dim tsv As TimeScaleValues
Dim i As Long
Dim bCalc As Boolean
On Error Resume Next
'get the current application calculation state
bCalc = Application.Calculation
'set calculation to manual (helps with performance while the code runs)
Application.Calculation = pjManual
Set t = ActiveProject.Tasks
'walk through the tasks in the project. If a task as a baseline(s) then set a timescaled baselinecost = 0
For i = 1 To t.Count
If Not t(i) Is Nothing Then
If t(i).BaselineStart <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).BaselineStart - 1, t(i).BaselineStart - 1, pjTaskTimescaledBaselineCost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline1Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline1Start - 1, t(i).Baseline1Start - 1, pjTaskTimescaledBaseline1Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline2Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline2Start - 1, t(i).Baseline2Start - 1, pjTaskTimescaledBaseline2Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline3Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline3Start - 1, t(i).Baseline3Start - 1, pjTaskTimescaledBaseline3Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline4Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline4Start - 1, t(i).Baseline4Start - 1, pjTaskTimescaledBaseline4Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline5Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline5Start - 1, t(i).Baseline5Start - 1, pjTaskTimescaledBaseline5Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline6Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline6Start - 1, t(i).Baseline6Start - 1, pjTaskTimescaledBaseline6Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline7Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline7Start - 1, t(i).Baseline7Start - 1, pjTaskTimescaledBaseline7Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline8Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline8Start - 1, t(i).Baseline8Start - 1, pjTaskTimescaledBaseline8Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline9Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline9Start - 1, t(i).Baseline9Start - 1, pjTaskTimescaledBaseline9Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If t(i).Baseline10Start <> "NA" Then
Set tsv = t(i).TimeScaleData(t(i).Baseline10Start - 1, t(i).Baseline10Start - 1, pjTaskTimescaledBaseline10Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
End If
Next
'fix the project summary task
With ActiveProject.ProjectSummaryTask
If .BaselineStart <> "NA" Then
Set tsv = .TimeScaleData(.BaselineStart - 1, .BaselineStart - 1, pjTaskTimescaledBaselineCost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline1Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline1Start - 1, .Baseline1Start - 1, pjTaskTimescaledBaseline1Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline2Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline2Start - 1, .Baseline2Start - 1, pjTaskTimescaledBaseline2Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline3Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline3Start - 1, .Baseline3Start - 1, pjTaskTimescaledBaseline3Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline4Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline4Start - 1, .Baseline4Start - 1, pjTaskTimescaledBaseline4Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline5Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline5Start - 1, .Baseline5Start - 1, pjTaskTimescaledBaseline5Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline6Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline6Start - 1, .Baseline6Start - 1, pjTaskTimescaledBaseline6Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline7Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline7Start - 1, .Baseline7Start - 1, pjTaskTimescaledBaseline7Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline8Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline8Start - 1, .Baseline8Start - 1, pjTaskTimescaledBaseline8Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline9Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline9Start - 1, .Baseline9Start - 1, pjTaskTimescaledBaseline9Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
If .Baseline10Start <> "NA" Then
Set tsv = .TimeScaleData(.Baseline10Start - 1, .Baseline10Start - 1, pjTaskTimescaledBaseline10Cost, pjTimescaleDays)
If tsv(1).Value = "" Then
tsv(1).Value = 0
End If
End If
End With
'set the application calculation state back the way it was
Application.Calculation = bCalc
End Sub
Timesheets created without Admin tasks
Here's another thats not been reproduced yet, but I am receiving notifications from a customer that some users are seeing their timesheets created without Admin Tasks
Now there was an issue with this under delegation from 2010 days (2010 - http://support.microsoft.com/kb/2553504 ) but again I have been unable to reproduce as of yet.
to isolate and resolve the issue I ran the following once the issue had occurred. This doesnt repro the problem.
I delegated as user
opened timesheet and submitted
at this point i noted the error but also saw that the timesheet did submit
Recalled and deleted timesheet (taking note of actual hours logged for reference)
Recreated timesheet and got the following error:
"the timesheet creation failed because of problems with the project web app or with data validations"
Noted that Admin Tasks had not been added to the timesheet
Manually added these
Submitted timesheet
no issue noted
This comment has been removed by the author.
ReplyDeleteHi Carl,
ReplyDeleteBeen a while! :) Have you tried testing with baselines when reproducing that one? That nearbaseline blog talks about a regression from AprilCU which is still pending a fix from Microsoft. They were talking OctCU but I don't know.. I'd be interested to know if it's a new issue or the same.
Hey chap indeed, loooong time!!
ReplyDeleteYeah I'm just surprised it's not had as much publicity. I haven't been able to repro it though (my lab is on June cu) so I'm thinking there must be something else in the trigger for this
ReplyDeleteInformative post. Thanks for sharing
onlineprojectserversolution