SSRS Time line, chronological bar

DJPB picture DJPB · Jul 21, 2011 · Viewed 8.2k times · Source

I'm building a report that is basically a time line indicating different status in a day For exemple, suppose I have this data

TIME                    |  STATUS
________________________|________   
2011-07-21 11:04:00.000 | Working
2011-07-21 11:05:00.000 | Working
2011-07-21 11:06:00.000 | Working   
2011-07-21 11:07:00.000 | Resting   
2011-07-21 11:08:00.000 | Resting
....    
2011-07-21 12:00:00.000 | Resting   
2011-07-21 12:01:00.000 | Working   
2011-07-21 12:02:00.000 | Working   
...

And I would like to generate some kind of chart like a chronological horizontal bar something like this

enter image description here

being green working time and red resting time =)

i'm using report builder and I don't now where to go

I tried to use a bar chart but it tends to 'acumulate' status, appearing a big green bar and then, the rest, a big red bar...

Any tip where to start?

Tks

Answer

ArchLch picture ArchLch · Jun 13, 2012

I know this thread is old, but I ran across it as I worked to build this exact report. I succeeded and it's sweet.

Use a Range Bar chart.

In the data series set the Top value to EndDate or (Duration + StartDate) and the Low value to StartDate. Click on Fill and specify and use Kevin Fisher's SWITCH example above for the fill color.

The key to getting the look you requested is through the series Property window. Under CustomAttributes, set DrawSideBySide=False.

The below links provide some Gantt-style examples that may help with additional tweaks.

http://pnarayanaswamy.blogspot.com/2010/09/range-bar-chart-gantt-chart-using-ssrs.html

http://thinkepm.blogspot.com/2012/05/creating-portfolio-timeline-using-ssrs.html

Hope this helps someone out there, there is certainly a lack of examples for this.