Conditional Gantt bar formatting in Prj02

D

Dave

Project versions prior to 02 support a total of 44 distinct bar styles
per Gantt view. Does anybody know if 02 has changed in that respect?

I need a bunch more than 44 styles per view in order to place text
labels in alternating positions (left, right, top, bottom) on summary
bars so they do not overlap one another. One approach I've used is to
create in code, for each set of records displayed, a custom Gantt bar
style tailored to the conditions present in that specific set of
records. This defines bar styles only for the data actually existing
in the current recordset, which never exceeds 44 distinct styles. This
approach works fine, but it's a little slow (I produce hundreds of
Gantt charts every day via an automated process): a fixed view with
all the styles I might need would be a lot faster and simpler).

Does anybody have any further suggestions?

Thanks
Dave
 
J

Jack D.

Dave said:
Project versions prior to 02 support a total of 44 distinct bar styles
per Gantt view. Does anybody know if 02 has changed in that respect?

I need a bunch more than 44 styles per view in order to place text
labels in alternating positions (left, right, top, bottom) on summary
bars so they do not overlap one another. One approach I've used is to
create in code, for each set of records displayed, a custom Gantt bar
style tailored to the conditions present in that specific set of
records. This defines bar styles only for the data actually existing
in the current recordset, which never exceeds 44 distinct styles. This
approach works fine, but it's a little slow (I produce hundreds of
Gantt charts every day via an automated process): a fixed view with
all the styles I might need would be a lot faster and simpler).

Does anybody have any further suggestions?

Thanks
Dave

I've used two approaches for similar situations. They may not fit your use,
but perhaps you can borrow some idea from them.
First is to use a custom field to concatenate data.
For example you can define Text1 to be [Name] & " " & [Finish]
Or you can reference another Text field (which contains a variable number of
spaces) to move the text to the right or left.
Example Text2 could be [Text1]&[Name] and you can put any number of spaces
in Text1

The second is to use a few different text fields. Create a bar style for
each of the text positions (top, left etc.)
For each of those styles use the text from a different text field. Then if
you want a specific bar to show the data, simply copy the data into that
text field.

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently. For Macros and other things check http://masamiki.com/project

-Jack Dahlgren, Project MVP


+++++++++++++++++++
 
D

Dave

Thanks, Jack -

I'm already concatenating fields to create composite labels, but I
hadn't thought of using spaces to move them left and right - great
idea! I'm short on available text fields, so I have to be pretty
stingy in how I use them.

Cheers
Dave

Jack D. said:
Dave said:
Project versions prior to 02 support a total of 44 distinct bar styles
per Gantt view. Does anybody know if 02 has changed in that respect?

I need a bunch more than 44 styles per view in order to place text
labels in alternating positions (left, right, top, bottom) on summary
bars so they do not overlap one another. One approach I've used is to
create in code, for each set of records displayed, a custom Gantt bar
style tailored to the conditions present in that specific set of
records. This defines bar styles only for the data actually existing
in the current recordset, which never exceeds 44 distinct styles. This
approach works fine, but it's a little slow (I produce hundreds of
Gantt charts every day via an automated process): a fixed view with
all the styles I might need would be a lot faster and simpler).

Does anybody have any further suggestions?

Thanks
Dave

I've used two approaches for similar situations. They may not fit your use,
but perhaps you can borrow some idea from them.
First is to use a custom field to concatenate data.
For example you can define Text1 to be [Name] & " " & [Finish]
Or you can reference another Text field (which contains a variable number of
spaces) to move the text to the right or left.
Example Text2 could be [Text1]&[Name] and you can put any number of spaces
in Text1

The second is to use a few different text fields. Create a bar style for
each of the text positions (top, left etc.)
For each of those styles use the text from a different text field. Then if
you want a specific bar to show the data, simply copy the data into that
text field.
 
J

Jack D.

Dave said:
Thanks, Jack -

I'm already concatenating fields to create composite labels, but I
hadn't thought of using spaces to move them left and right - great
idea! I'm short on available text fields, so I have to be pretty
stingy in how I use them.

Cheers
Dave

Jack D. said:
Dave said:
Project versions prior to 02 support a total of 44 distinct bar styles
per Gantt view. Does anybody know if 02 has changed in that respect?

I need a bunch more than 44 styles per view in order to place text
labels in alternating positions (left, right, top, bottom) on summary
bars so they do not overlap one another. One approach I've used is to
create in code, for each set of records displayed, a custom Gantt bar
style tailored to the conditions present in that specific set of
records. This defines bar styles only for the data actually existing
in the current recordset, which never exceeds 44 distinct styles. This
approach works fine, but it's a little slow (I produce hundreds of
Gantt charts every day via an automated process): a fixed view with
all the styles I might need would be a lot faster and simpler).

Does anybody have any further suggestions?

Thanks
Dave

I've used two approaches for similar situations. They may not fit your
use,
but perhaps you can borrow some idea from them.
First is to use a custom field to concatenate data.
For example you can define Text1 to be [Name] & " " & [Finish]
Or you can reference another Text field (which contains a variable
number of
spaces) to move the text to the right or left.
Example Text2 could be [Text1]&[Name] and you can put any number of
spaces
in Text1

The second is to use a few different text fields. Create a bar style for
each of the text positions (top, left etc.)
For each of those styles use the text from a different text field. Then
if
you want a specific bar to show the data, simply copy the data into that
text field.


Can't you just make your chart really big and use a tiny font? :)
--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.
For Macros and other things check http://masamiki.com/project

-Jack Dahlgren, Project MVP


+++++++++++++++++++
 
D

Dave

Can't you just make your chart really big and use a tiny font? :)
--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.
For Macros and other things check http://masamiki.com/project

-Jack Dahlgren, Project MVP


+++++++++++++++++++

Now, there's a thought! Let's see, if I could get the customer to
spring for about 800 42" plasma displays these web pages would be the
talk of the town! I'll let you know how it goes...

Cheers
Dave
 
R

Rod Gill

Hi,

You mention a fixed view. By that do you mean one that's always available?
You can do that by copying the view to the Global.Mpt file using the
Organizer (under Tools menu) or by having a project template into which
tasks are merged.


--
Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.projectlearning.com/
 
D

Dave

Hi, Rod -

By fixed view I just meant that I would like to be able to create a
view in which more than 44 distinct Gantt bar styles can be defined.
Because of Project's bar style limit of 44 per view I have to do a lot
of ad hoc crunching in order to accommodate all of the styles I need
(task bars and milestone symbols distinguished by shape and color for
three different kinds of dates, 4 different administrative control
levels, slips, etc., as well as 4 alternate label placements - L, R,
T, B - for each. This comes out to 3 X 4 X 2 X 4 = 96 possible
distinct bar styles.

Cheers
Dave
 

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