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

Arranging columns automatically on open 1

Status
Not open for further replies.

Mindy343

Technical User
Sep 9, 2004
35
US
I need to rearrange the columns in a project file automatically when the file is opened. Users insert, move and hide columns in the file depending on the info they need to see/update so when the next person opens the file it may have any number of columns showing in any order. The majority of the users only use the file to view the schedule and I need to display only a few columns (WBS, Name, %Complete, Start and Finish) in the gantt view when the file is opened. Any ideas?
 
I'll try to keep this short enough that you don't get bored by the end. On the other hand, there's some stuff I'm going to write that will be useful to a broader audience.

I'm going to start from the bottom of the hierarchy to explain how things work.

A Filter is a way to selectively display only those elements which meet a set of criteria. When you're looking at Tasks: the Summary filter displays only those tasks which are Summary tasks; the Critical filter displays only those tasks which are flagged as Critical (no float) tasks. There are some predefined filters ("All Tasks", "Summary", etc.) and you can define your own. Click on Project > Filtered For > More filters and you'll see all the filters available to your project file and you'll see that you can create your own. Creation is easy but beyond the scope of this topic.

A Group By (only available since, I believe, P2000) is a way of arranging all data (after applying the Filter). Click on Project > Group By > More Groups and you'll see all the Groupings that are available to your project file and you'll see that you can create your own. Creation is easy but beyond the scope of this topic.

We're almost there.

We discussed Filters and Groups. Now we need to discuss Tables.

A table (in project) is NOT the same as a SQL table. It is, instead, a collection of columns defining how they are presented so you'll see the Project column name, how the data is to be displayed, the number of positions it can occupy, a special title, etc.

You can, in fact, define your own table (but, remember, it's not a SQL table) that lists the data columns you want displayed and how you want them displayed. If you create a table based on Tasks then you'll only be presented with Task columns. If you create a table based on Resources then you'll only be presented with Resource columns. Astute readers will already have noticed that you don't get to see Assignment columns or TimeScaleData.

Now, let's collect all that information into a single topic. That's a View. A "View" consists of (as mentioned above) a Grouping, a Filter and a Table. I could create two Groupings (Group1 and Group2) and two filters (Filter1 and Filter2) and a new table (Table1).

Now I create two views: View1 is Group1, Filter1, Table1 and View 2 is Group2, Filter2 and Table1. Notice that I have used the same table in both cases.

Supposing that I now select View1. After it appears, I add another column to the display. This column (behind the scenes) is added to the list of columns I defined for Table1. Now I select View2. Since both views use the same table, both views show the same columns -- and View2 now includes the column I added a moment ago. You've probably guessed that if you remove a column from display in View2 then that column won't be displayed in View1 because they use the same table.

Now to answer your question: there's nothing you can do to stop your users from modifying the information display. As a workaround, you could create View_Bob, View_Ram, View_Maria and tell each user to use only the View that is defined for him/her. But, as you now know from above, you'll have to create a separate *table* for each View so that any columns that Bob adds/removes only affects his display and any columns that Maria adds/removes only affects her display. Don't forget to create your own View_Mindy343 (using table Mindy_343) so you can see just the information you want in the sequence you want.

Topics for another time: dynamically creating a table and a view (needs VBA so I won't be writing it here because it would take forever); forcing Project to dynamically create that table and view and automatically applying it when the project file is opened (uses even more VBA).

Thanks, Mindy_343, for asking the question so I could document how filters, groupings and tables are combined to make a View.








 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top