简体   繁体   English

SSRS如何在条形图上停止重复一年

[英]SSRS how to stop repeating year on a bar chart

I was wondering if a dataset has a year and month for a whole year dataset. 我想知道一个数据集是否具有全年数据集的年份和月份。 How can you have it so the year part isnt showing up for every month on the chart. 您如何拥有它,这样就不会在图表上每个月都显示出年份部分。 so say if the report is ran for 01/04/2015 to 31/03/2016, the year part appears twice but not repeating 12 times for each month. 因此,假设报表执行时间为2015年4月1日至2016年3月31日,则年份部分会出现两次,但每个月不会重复12次。

Just another quick question, in my chart I have formated the date i am using which the values looks like the following '2015-09-02 00:00:00.000' so in the chart category I have the date formated to show as (format(date,"MM/yy")) this is used in the group by as i need the data for monthly. 另一个快速的问题,在我的图表中,我已经格式化了我正在使用的日期,其值看起来像下面的“ 2015-09-02 00:00:00.000”,因此在图表类别中,我将日期格式化为显示为(format (日期,“ MM / yy”))在组中使用,因为我需要每月的数据。

However by doing this it takes ages for the chart to load, is there any better way to do this for monthly, the result set is about 90,000 rows 但是,这样做需要花费一些时间才能加载图表,是否还有更好的方法可以每月进行一次,结果集大约为90,000行

If you have a dataset query like 如果您有类似的数据集查询

SELECT        RIGHT(CAST(MONTH(soh.OrderDate) + 100 AS char(3)), 2) + '/' + RIGHT(CAST(YEAR(soh.OrderDate) AS char(4)), 2) AS MMYY, YEAR(soh.OrderDate) AS YYYY, MONTH(soh.OrderDate) AS MM, SUM(sd.OrderQty) 
                         AS Qty
FROM            Sales.SalesOrderHeader AS soh INNER JOIN
                         Sales.SalesOrderDetail AS sd ON sd.SalesOrderID = soh.SalesOrderID
WHERE        (soh.OrderDate BETWEEN @StartDate AND @EndDate)
GROUP BY YEAR(soh.OrderDate), MONTH(soh.OrderDate)

For the first question set pick yyyy ,mm as category group 对于第一个问题集拾取YYYY,作为毫米类别组

For the second question pick mmyy as category group then right click on category group properies, click sorting and add yyyy and mm in the change sorting options dialog. 对于第二个问题MMYY挑选为类别组,然后用鼠标右键单击类别组性的判定,点击排序,并在排序的变化选项对话框中添加YYYY和毫米。

SalesOrderDetils in Adventurworks2012 contains 121,000 records and the charts are returned preety quickly on my low spec pc. 在Adventurworks2012中,SalesOrderDetils包含121,000条记录,并且图表在我的低规格PC上迅速返回。

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

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