none
How to create a Gantt Chart using report control? RRS feed

  • Question

  • Hi,

    I am using visual studio 2010 to create a VB reporting website. I found a blog which tells me how to use range bar chart to create a gantt chart. But I got some problems with how to group the bars(tasks) on task names.

    My database structrue is shown below:
    Taskname   StartTime               EndTime
    task1         2012-03-01 8:00     2012-03-01 10:00
    task2         2012-03-01 9:00     2012-03-01 14:00
    task1         2012-03-01 17:00   2012-03-01 18:00
    task2         2012-03-03 18:00   2012-03-03  19:30

    I would like use the above data to generate a gantt chart like this:
             task1                                           task1
              -----                                           ---
                     task 2                                                        task 2
                    -------------------------                                 -------

    In visual studio's report designer, I first added a range bar chart. Then dropped the taskname filed to the category fileds. So my understanding is the range bars will be grouped by task name. For the data fields, I dropped starttime(start value) and endtime(top value). I also set the 'draw side by side' property to false. But when I run my website, I could only see one task for each task type in the gantt chart( one task1 and one task 2) . It didn't show me all the tasks. So my incorrect result is shown below:

            task1
            ------
                    task 2
                    ------------------------- 

    No matter how many records are there in my database, the gantt chart only shows the first record for each task type. Does anyone know why this could happen? I wasted lot of time on this now:(. Please help me out of this.

    Monday, March 19, 2012 3:43 AM

All replies