SSRS时间线,时间条
我正在构建一份报告,该报告基本上是一条时间线,指示一天中的不同状态 例如,假设我有这些数据
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
...
并且我想生成某种图表,例如按时间顺序排列的水平条 像这样的
是绿色工作时间和红色休息时间 =)
我正在使用报告生成器,但我不现在不知道该去哪里,
我尝试使用条形图,但它倾向于“累积”状态,出现一个大的绿色条,然后,其余的,一个大的红色条...
有什么建议从哪里开始吗?
塔克斯
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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这条线索很旧,但我在构建这份确切的报告时遇到了它。我成功了,而且很甜蜜。
使用范围条形图。
在数据系列中,将最高值设置为 EndDate 或 (Duration + StartDate),将最低值设置为 StartDate。单击“填充”并指定并使用上面 Kevin Fisher 的 SWITCH 示例作为填充颜色。
获得您所要求的外观的关键是通过系列属性窗口。在 CustomAttributes 下,设置 DrawSideBySide=False。
下面的链接提供了一些甘特图样式的示例,可能有助于进行其他调整。
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
希望这对那里的人有帮助,肯定缺乏这方面的例子。
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.
最简单的方法可能是单系列面积图,其中 Y 值静态设置(例如,设置为 1)。将 X 值设置为时间字段。在系列属性中,您可以将填充颜色设置为表达式:
这应该为您提供一个恒定高度的条,该条根据状态值更改颜色。调整轴并调整格式,就可以了!唯一的麻烦可能是获得边界,因为你现在拥有它,但它可能是可能的......
希望这会有所帮助。如果您在处理过程中有任何疑问,请告诉我。
The easiest approach may be a single series area chart, with the Y value set statically (at 1, for example). Set your X value to the time field. Within the series properties, you can set the fill color as an expression:
This should give you a constant height bar that changes colors according to the Status value. Adjust the axis and tweak the formatting, and you're there! The only trouble may be getting the border as you have it right now, but it may be possible...
Hope this helps. Let me know if you have any questions as you're going through it.