找到你要的答案

Q:SSRS-range bar chart axis label in quarters (Q1, Q2, Q3, Q4)

Q:SSRS范围条形图轴标签在宿舍(Q1,Q2,Q3,Q4)

I've created a range bar chart using SSRS 2008.

It is a date range

StartDate is =DateAdd("yyyy",-2,Today())

EndDate is =DateAdd("yyyy",2,Today())

Is there a way to format the Axis labels to show in Quarters?? I am able to display in "MMM-YY" format. But I want it in "Qq-yyyy" format.

Thanks!! Any help is appreciated.

我创建了一个采用SSR 2008系列条形图。

这是一个日期范围

开始日期是= DateAdd(“yyyy”,2,today())

EndDate = DateAdd(“yyyy”,2,today())

Is there a way to format the Axis labels to show in Quarters?? I am able to display in "MMM-YY" format. But I want it in "Qq-yyyy" format.

谢谢!任何帮助是赞赏。

answer1: 回答1:

use following format:

="Q"+Cstr(DatePart(DateInterval.Quarter,today()))+" - "+Cstr(Format(Today(),"yyyy"))

Output will be : "Q4 - 2014"

Put Your Date Field/Axis labels Filed instead of "Today()" in above expression.

使用下列格式:

="Q"+Cstr(DatePart(DateInterval.Quarter,today()))+" - "+Cstr(Format(Today(),"yyyy"))

输出将:“Q4 2014”

把你的日期字段/轴标签领域而不是“today()”上面的表达。

reporting-services  ssrs-2008  ssrs-2008-r2  axis-labels