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

Gantt Chart Bar Coloring based on resource 1

Status
Not open for further replies.

toolkit

Programmer
Aug 5, 2001
771
GB
A quick question for all of you project gurus...
Is there an easy way of coloring tasks in the Gantt chart view according to the resource assigned to this task. Or since you can assign more than one resource, is this not possible? If not, then I guess I can use a custom flag to achieve a similar effect, but I will have to remember to change the flag when I change the resource?

Thanks, Neil
 
Managed to sort this one out...
Cheers, Neil
 
How?... there's got to be a better way than manually changing the bar colours. Can't seem to find anything in the help.

Thanks.

Jon.
 
Here's how I did it. It works quite well for my requirements.

1. On the resource view, ensure each resource has unique initials.
2. On the gantt chart view, click 'Tools -> Customize -> Fields'
3. On the 'Type' dropdown, choose Flags
4. Assuming your first resource has initials NL, rename flag1 to 'NL' using the Rename button.
5. Click the Formula button, and choose the formula to be:

[Resource Initials]="NL"

6. Double click in the calendar portion of the gantt chart view to bring up the Bar Styles dialog
7. Below the normal styles, insert a new style named NL. Assign a colour, and choose to show for Flag1 from Start to Finish

You can repeat this for each resource. Theres a little more jiggery pokery to get progress lines to appear, but I'll leave that as an exercise ;-)

Cheers, Neil
 
Many thanks for the help, Neil.

I understand the theory behind your solution but can't quite get the desired results. I've created a very simple program and assigned and modified the resources as per your instructions but the bars remain the default blue colour. So I have a few ideas...

Q1. In the 'Customize Fields' dialog, should the flag properties be changed in the 'Task' or the 'Resource' heading?

Q2. When I'm entering the formula in the 'Customize Fields' dialog, should I be choosing criteria via the 'Fields' or 'Functions' pulldowns or is just a matter of actually entering the exact text "NL" in the dialog screen?

Q3. Do the progress bars need to be formatted to an 'Automatic' colour or are they OK as default blue?

Any help would be appreciated!

Thanks again,

Jon.
 
Q1. In the 'Customize Fields' dialog, should the flag properties be changed in the 'Task' or the 'Resource' heading?

A1. Task

Q2. When I'm entering the formula in the 'Customize Fields' dialog, should I be choosing criteria via the 'Fields' or 'Functions' pulldowns or is just a matter of actually entering the exact text "NL" in the dialog screen?

A2. [Resource Initials] can be found in 'Field -> Text -> Resource Initials'. Then I just manually add ="NL"

Once you have done this, add the new bar style, then assign a task to this resource. If all is set up correctly, then the task colour should use the bew bar style.

Q3. Do the progress bars need to be formatted to an 'Automatic' colour or are they OK as default blue?

A3. I created a 'Progress2' bar style with similar settings to the original 'Progress' bar style. The only difference was I showed for Flag20, where Flag20's formula was set to True.
 
That's it! It works like a dream!

I wasn't entering the 'Customize Fields' formula correctly.

Many thanks,

Jonno.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top