Baseline Save Date & External Reporting

D

David Martin

Hi all - I am using Crystal Reports to create management reports from Project
Server 2003 and have a requirement to display the date that a baseline was
created but I can not find the appropriate field.

Any ideas???

Thanks in advance...
 
J

John

David Martin said:
Hi all - I am using Crystal Reports to create management reports from Project
Server 2003 and have a requirement to display the date that a baseline was
created but I can not find the appropriate field.

Any ideas???

Thanks in advance...

David,
The Baseline saved date is not a field in Project but it is available
through VBA. However, since this newsgroup is dedicated to the
standalone version of Project, I suggest you post to our sister
newsgroup, microsoft.public.project.server. Maybe the Server MVPs have
other suggestions.

John
Project MVP
 
D

David Martin

Thanks John...will do.

John said:
David,
The Baseline saved date is not a field in Project but it is available
through VBA. However, since this newsgroup is dedicated to the
standalone version of Project, I suggest you post to our sister
newsgroup, microsoft.public.project.server. Maybe the Server MVPs have
other suggestions.

John
Project MVP
 
L

LindaC

John - I have a similar need. Is it possible to use VBA to copy the baseline
saved date into a regular Project field? (I am running Project Server 2002)
 
J

John

LindaC said:
John - I have a similar need. Is it possible to use VBA to copy the baseline
saved date into a regular Project field? (I am running Project Server 2002)

LindaC,
Sure, the following simple code will put the last baseline save date for
the normal baseline into text 1 of the Project Summary Task.

Sub BSaveDate()
ActiveProject.ProjectSummaryTask.Text1 = _
ActiveProject.BaselineSavedDate(pjBaseline)
End Sub

Hope this helps.
John
Project MVP
 
L

LindaC

Thanks, that does help. Now, can I put that value in the Text1 field (or
better yet, in a date field) for every task in the project, not just the
Project Summary Task?

(Sorry if this is elementary, I really don't know anything about VBA)
 
J

John

LindaC said:
Thanks, that does help. Now, can I put that value in the Text1 field (or
better yet, in a date field) for every task in the project, not just the
Project Summary Task?

(Sorry if this is elementary, I really don't know anything about VBA)

LindaC,
No problem, try the following code,

Sub BSaveDate()
Dim BSavDat As Date
Dim t As Task
BSavDat = ActiveProject.BaselineSavedDate(pjBaseline)
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
t.Date1 = BSavDat
End If
Next t
End Sub

Note however that if you save a new baseline for selected tasks (e.g.
added tasks, change in scope, etc.), the above code will put that date
against all tasks, not just those that were updated. The code could be
further modified to work for selected tasks but some type of "tag" would
be needed to identify the changed tasks (e.g. spare flag).

John
Project MVP
 
A

Anuj Gupta

Hi Linda,John,

When i am deploying the macro on enterprise enviornment on before save event of project by follwoing code:

Dim Baseline0saveddate As Date
Baseline0saveddate = ActiveProject.BaselineSavedDate(pjBaseline)

But during the closure of project i am getting again and again error run time mismatch .

code is working fine in case of any active project.issue is only during the closure of microsoft project when there is no active open project.

Please suggest.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top