Wednesday, February 01, 2006

 

New version of Gantt part: Group By and Year/Month/Week views

I have been making some enhancements to the Gantt chart web part. There are basically 2 new features:

Shots

This is the classic month/day view, but now using groupings:

This is the new month/week view. Keep in mind that week numbers are fairly complex stuff and that the outcome depends on the local culture settings of your server. My development server uses Dutch settings and therefore the week numbers in this image reflect ISO week numbering:

And finally the year/month view:

Apart from the really new features, I also added some more robust error handling, preventing the web part to crash when a wrong or misspelled view name is entered. I hope that this will make the part more usable.

Download and Installing

Download the binaries and sources here. Then install the part on your server using the contained dll and dwp files.

Check out this manual for how to install a web part when you have no installer, but only the dll and dwp files.

When configuring the web part, you'll have to manually enter the list name, view name, start date field, end date field, title field and finally the Timebar mode (valid values are YearMonth, MonthWeek and MonthDay).

Labels:


Comments:
Hello, I'm trying to install the webpart with the dll & dwp files in the bin & wpcatalog directories and I've modified the web.config to register it as safe control.
But when I try to drag the WebPart into the page, I get the error, "Cannot add Web Part to the Web Part Page. For more assistance, contact your site administrator." But I am the admin and I have no idea about this issue.
Could you help me please?
 
Ok, I've found a solution to this issue. I've installed dll in the Assembly directory c:\windows\assembly and now it's working... maybe not a perfect install.
Have you idea about this issue?
What a good webpart with very nice features!!
Thanks a lot for it.
 
In a default WSS installation, the bin directory should be enough. Installing a web part in the GAC may grant it an extra trust level, but this web part does not require any special permissions. More info on installing and deploying web parts:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_sp2003_ta/html/sharepoint_deployingwebparts.asp
 
Hello,
I downloaded and installed the Gant part and it is running fine. I am a little bit surpise though, the Grouping feature does not seems to work and the property for setting the view is not available from SPS. I check the source code and I do not see anything about he Mode.

I am wondering if the link for the download is right?

Great job regardless!!
 
@Emmanuel: maybe you downloaded the older version of the part before? I placed the new download at the same URL, so maybe your browser cached the old version. Try clearing your cache.
 
The part works great if you use a task list that hasn't been altered.
For instance - I added a new TASK LIST then changed Title to Task and now the webpart doesn't see Title or Task.
I tried changing Task back to Title and the webpart has an error and has to be deleted. Also when I try to view a list that I had that didn't have the Start date as a choice, I added Start Date and added it to the View only to not have it available to the webpart
I.E.- StartDate is not available try this, this or this none of which was the correct choice. Im not sure what is wrong however maybe you can tell me how to make added columns available to the part?

Thank you for making this webpart available Teun. I know it was alot of work.
 
First off The part on standard Task List worked great!

But, I am trying to use this web part with a List created from the "Custom List" template. i added all fields I need (date begin, date end).

My problem: It seems that the Gant part does not recoginzed the extra fields.

Here the error message:
"Start field StartDate is not known. Try one of these: Attachments, LinkTitle".
 
To both Dane and Emmanuel: I think that the confusion comes from the fact that the web part renders information from a view, not a list. When you add a new field to a list, you must also add it to the view that you use in the web part.
I will make a step-by-step tutorial with screen shots soon.
The reason I chose to present views and not whole lists, is that now you can specifiy filters, groups and even calculated fields for the chart. When you leave the View field blank, the part will use the default view for the list.
 
I did add it to the view and it still doesn't see it.
Seems arnaud might have the same issue Teun. The tutorial illustrates my understanding so I don't think my installation is the problem.
dpiatt@wsi.aquilex.com
 
I tried to download but it was blocked by our firm. Is it possible to forward me the zip file to segers_brt@yahoo.com.
Thank you,
Bart Segers
 
A couple of observations:
(1) I, too, had to GAC the assembly to get it to be recognized as safe. This is probably due to the global security settings in the web.config file.
(2) The field names it uses are the "internal" field names, not the field display names. This might be what is causing some confusion for some people.
(3) "Interesting" behavior: I placed the web part in the top zone of a web page. I have several other web parts in the middle left zone. This gantt part is rendered ON TOP of those parts in the middle left zone, instead of expanding the top zone. I would consider this a rather important bug...
(4) Other features I would like to see:(a)expand/collapse nested group items
(b)dynamic changing of time mode
 
I'm having the same problem. My "internal" and view field names are "open_dt" but when this is in "Start Field" I get a:

"Start field open_dt is not known. Try one of these: Attachments, LinkTitle "
 
I'm guessing you haven't added open_dt to your view name. The suggested list of fields is taken directly from the view field list. So if you want open_dt to be in your chart, you need to have it in the view that the chart is using.
 
Another HUGE limitation is the lack of scrolling - the chart just grows to the size needed to display all events. This is bad for several reasons:
1. The current behavior simply overlays the chart on top of any other items on the page (it doesn't stay in its web part zone). So as it grows, it will cover up other items on the page.
2. For a chart with many events and/or one with events far in the future, the chart grows beyond readability.
I'd REALLY like to see scroll bars!
 
Regarding the lack of scrolling, AND the overlaying of the chart on other page objects - if you set the web part attributes to a specific height and width, it will scroll as appropriate, AND it will fit inside the web part bounds, and NOT overlay other web parts.
 
when I added the "edit" field to the view, and tried to access it in the datarow, it would cause the webpart to crash. Any idea why?
 
After adding your part I cannot click on the "new Item" link from the view page or the "current events" view. I get this error: "Access is denied: 'Duynstee.GanttChart.WebPart'."

I CAN create a new item when the view is in grid display mode.

Have you seen this behavior before?

I had to GAC the assemblies to get them to work, BTW, probably due to portal security settings...
 
I found something that may help knowing when you need to install in the GAC or not.
"In some IIS configurations, you must install assemblies in the GAC. For example, when you configure an IIS virtual server, extended by using Windows SharePoint Services, that has a host header name, you must install Web Part assemblies in the GAC."
My web is setup this way so I have to install globally, too. I am not able to get the part to work, though. I keep getting the "trust" error. I had to create my own "Manifest.xml" to build a cab file for installation via stsadm. Maybe the problems, for me, is in this file. I need help getting this installed correctly.
 
I think I did something wrong. But since I don't really know what, I decided to drop it here and share my experiences with other users.

the configuration goes smooth and after selecting the appropriate fields, the Gantt chart displays correctly.
When I move away from the page or simply refresh the page I receive the error message that so many people are getting. Since the View is correct I decide to simply reapply the View and voila the gantt chart returns.

I would like to know if this is a fault of mine or if something is missing in the webpart??

thnx for the tool though. Very nice.
 
Robert, could you maybe e-mail me some details about the problem you and some other users are experiencing? Maybe you can make some screenshots of what exactly you are trying to do. You can sent it to me at teun[at]duynstee.com. Much obliged.
 
Teun,

The Gantt web part looks nice but my hosting provider won't consider installing any web part unless it's a CAB or MSI file.

Would it be asking to much?

Best Regards,

Gilson
 
Hi,

I am very interested in using this webpart, BUT, once getting it all installed... I get the error message "No such field name No field was found with that name. Check the name, and try again". All the fields are in the view, and are being used in the task... Am I missing something really simple?

Thanks!

Eamon
 
Hi,

I have the same problem as Emmanuel I also get the error "Start field StartDate is not known. Try one of these: Attachments, LinkTitle".

The field IS in the view, but the problem occurs if you add the listwebpart to the page. If the webpart is removed the error goes away.

Does anyone have an idea?
 
Dear all (Jesper, Emmanuel, others),

I am aware of this problem, but cannot reproduce the situation. I am currently working on a new version that will include an installer and setting the configuration through select lists. I do have a daytime job as well, though. I will post a new version here eventually.
 
The new features are excellent.. thanks for the great work...

I tested the newer version on some lists on my development box and all worked correctly.

Once I moved it over to my live system, however, and attempnt to use it with some larger lists, I have a few problems.

The list I'd like to use this against has about 30 columns and several views. I plan to create many more views where each drives a unique gantt.

However, when I select my list, all views appear, but mysteriously, a blank view row appears in the next to last spot.

All views result in only two choices in the title, start and end field drop downs (Attachments, Project Name). There actually is no column called attachments and they are not enabled for the list.

When I select the blank view row, a larger number of my columns are displayed in the drop downs, but not all of them. Thus, the appropriate date fields are not selectable.
 
OK.. The note above I've resolved by creating the Gantts on a different WSS page (why it didn't work on the desired web part page, I dont know).

So far, so good.

Small feature requrest for later version...

As is, all gantts scale from start date. If overall timeline is long, and start occurred weeks or months ago, the length of the chart remains long.

Could there be a way to set the start date for the overall graph to be a specific date or today minus XX days? Thus the overall length is trimmed.

Larry
 
HI,

Is this control works with MOSS2007 ?
 
Hi
Is it possible to get this webpart also in years. example:
2006 2007 2008 2009
without month?
Thanks for your answer
 
Can the grouping function, in this webpart, expand and collapse the groups.

Thanks,

Craig J.
 
@Craig: I understand whatyou want, but collapsing and expanding the regions is a lot more complex than you might expect. It cannot be done with this implementation. Sorry.
 
I am looking for a staff planner and I wonder if I could use the Gantt webpart. It would need to show the holidays or periods next to each other. Could you advise me if your webpart could be used (or maybe adapted)?
 
Hi all,

As I am not into Sharepoint development anymore, I will not have the time or motivation in the near future to make improvements or fix bugs on the Gantt Chart web part. I have no development environment up anymore and making changes would now be a serious effort.
However, you are free to use the sources I published to make your own. A link to the sources is in the article above.
 
Post a Comment

Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?