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

Grouping to show work / resource / phase

Status
Not open for further replies.

Grollen

Instructor
Feb 26, 2009
1
SE
Hi all,

I have a project file with the following structure:

1. Application A

1.1 Design

1.1.1 ActivityX ResourceA
1.1.1 ActivityY ResourceB
1.1.1 ActivityZ ResourceA

1.2 Build

1.2.1 ActivityX ResourceA
1.2.1 ActivityY ResourceB
1.2.1 ActivityZ ResourceA

1.3 Test

1.3.1 ActivityX ResourceA
1.3.1 ActivityY ResourceB
1.3.1 ActivityZ ResourceA

2. Application B

2.1 Design

2.1.1 ActivityX ResourceA
2.1.1 ActivityY ResourceB
2.1.1 ActivityZ ResourceA

2.2 Build

2.2.1 ActivityX ResourceA
2.2.1 ActivityY ResourceB
2.2.1 ActivityZ ResourceA

2.3 Test

2.3.1 ActivityX ResourceA
2.3.1 ActivityY ResourceB
2.3.1 ActivityZ ResourceA


I would like to group by outline level 1 and by resources in order to get the following view in the Resource Usage view:

1. Application A

ResourceA 34 hours
ResourceB 50 hours

2. Application B

ResourceA 45 hours
ResourceB 33 hours

However, no matter how I group it I can't get it like that way. The closest I can get is:

1. Application A

1.1 Design
ResourceA 3 hours
ResourceB 5 hours

1.2 Build
ResourceA 14 hours
ResourceB 20 hours

1.3 Test
ResourceA 5 hours
ResourceB 7 hours

2. Application B

1.1 Design
ResourceA 15 hours
ResourceB 5 hours

1.2 Build
ResourceA 4 hours
ResourceB 4 hours

1.3 Test
ResourceA 14 hours
ResourceB 14 hours

I.e. one level to far down in the outline.

And that is by grouping by Outline number and then resource name. If anyone has any ideas on this I would be very grateful.

Kind Regards
 
Up to P2003 cannot be done (don't know about P2007 -- I don't have a copy here).

Sub PDQBach()
Dim Tsk As Task
Dim Asgn As Assignment
Dim strName As String
Dim lngTask As Long
For Each Tsk In ActiveProject.Tasks
If Not Tsk Is Nothing Then
If Not Tsk.Summary Then
If Tsk.Assignments.Count > 0 Then
lngTask = Tsk.OutlineParent
strName = ActiveProject.Tasks(lngTask).Name
Do While lngTask <> 0
strName = ActiveProject.Tasks(lngTask).Name
lngTask = ActiveProject.Tasks(lngTask).OutlineParent
Loop
For Each Asgn In Tsk.Assignments
Asgn.Text1 = strName
Next
End If
End If
End If
Next
End Sub

View > Task Usage
Project > Group by > More groups ... click on New
Set the name field to PDQBach
Put a check mark in "Group assignments not tasks" checkbox
First level is "Text1"
Second level is "Resource Names"
In each row of the group by set "Field Type" to "assignment"
Click on OK to save it

View > Task Usage
Project > Group by > More groups... PDQBach; click on Apply

On the formatting bar select "Show Outline Level 2"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top