1 Ocak 2010 Cuma

Conditional Formatting

You will note that in the previous example the tasks are color coded by phase. It is possible to do this by formatting them individually, but that method is slow and does not follow any changes you have made to the task (ie: if you change it from Phase 1 to Phase 2 you need to manually reformat. Fortunately there is an easier way. We already have the first part because we have used the Text2 field to indicate which Phase each task is in. The next thing is to use a formula in a flag field to let project know how to format it. We do this because the formatting can use flags to determine how to format a specific task bar. Here is how we set the flag field to be set to "Yes" if the task is in Phase 1". First Right Click on the column header until it brings up the customize field dialog, Choose the Flag1 field and then click on the "Formula" button. This brings up the "Formula" dialog box. Enter the appropriate formula. Here we use an IIF statement. If the condition [Text2]="Phase 1"is true, then the first value "Yes"is returned. If false it returns the second value "No". IIF formula Syntax

Click OK to exit and then it is time to format the barstyle. This is pretty simple. Go to the "Format" menu, Select "Barstyles". Insert a row at the bottom and call it whatever you like. Then set it to draw based on "Flag1" just as shown here:

Format Barstyles

Set up other barstyles using other flag fields until you have one for every phase or for every category you are interested in. You can see that this file has three custom barstyles. One thing to be wary of. Bars are drawn in the order they are listed in. So a wide bar at the end of the list might be drawn over a bar which is defined earlier in the list. You should define the basic barstyles at the beginning and things like baselines further down the list.

Download the Microsoft Project File (Project 2002 format) that was used for this example

Hiç yorum yok:

Yorum Gönder