简体   繁体   English

SSRS柱形图和折线图?

[英]SSRS column and line chart?

Hello I have a simple dataset in SQL that counts meter readings... There are meter readings every day and I would like to SUM the count, display that in a column chart at a daily interval. 您好,我在SQL中有一个简单的数据集,可以对电表读数进行计数...每天都有电表读数,我想累加该计数,并每天在柱形图中显示该计数。 What I would also like to do is display a cumulative count as a line so 4 orders Monday, 3 orders Tuesday, 5 orders Wednesday 4+3+5 etc. Apparently there is a running total property I read somewhere in SSRS? 我还想做的是将累积计数显示为一行,因此星期一有4笔订单,星期二有3笔订单,星期三有5笔订单4 + 3 + 5等。显然我在SSRS的某处读取了正在运行的总资产? Does anyone know how to do this? 有谁知道如何做到这一点? I'm stumped! 我很难过! I currently have a SUM of count as my total value with category group of date read but it does not seem to be displaying properly. 我目前有一个总计的SUM作为我的总价值,加上日期读取的类别组,但似乎无法正确显示。 Instead of saying 5 orders on tuesday, it is just showing 1,1,1,1,1 etc... 与其在星期二说5个订单,不如显示1,1,1,1,1等...

SELECT     COUNT(readingId), dateRead
FROM         Readings
WHERE     (dateRead BETWEEN @StarDate AND @EndDate) AND (webcontactid IS NOT NULL) AND (meter = 1)
GROUP BY Readings.dateRead

如您所见,3月19日丢失了,因为我发现没有数据...有什么办法可以使它显示为0或什么都可以显示为空?

I created a bar chart, put dt as Category group, added a fake Series group called g1 (Group by "A"), and used two data fields, one with the expression 我创建了一个条形图,将dt放入Category组,添加了一个名为g1的虚假Series组(Group by“ A”),并使用了两个数据字段,其中一个带有

=Sum(Fields!NReadings.Value)

and one with the expression 一个带有表达式

=RunningValue(Fields!NReadings.Value, Sum, "g1")

and set this to appear as a line. 并将其设置为显示为一行。

I got this on SSRS 2005, but I hope it helps for 2008. If anyone has a way to do this without creating a fake Series, then please let me know. 我在SSRS 2005上获得了此功能,但希望对2008年有所帮助。如果有人可以在不创建假系列的情况下做到这一点,请告诉我。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM