我正在尝试更改SSRS中条形图水平轴的标签文本
尝试使用LabelStyle.Format
但未获得正确的值
以下是我试过的表达式
使用IIf案例:
=IIf(Fields!monthId.Value = 0 ,MonthName(Month(DateAdd("m", 0, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 1 ,MonthName(Month(DateAdd("m", -1, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 2 ,MonthName(Month(DateAdd("m", -2, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 3 ,MonthName(Month(DateAdd("m", -3, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 4 ,MonthName(Month(DateAdd("m", -4, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 5 ,MonthName(Month(DateAdd("m", -5, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 6 ,MonthName(Month(DateAdd("m", -6, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 7 ,MonthName(Month(DateAdd("m", -7, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 8 ,MonthName(Month(DateAdd("m", -8, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 9 ,MonthName(Month(DateAdd("m", -9, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 10 ,MonthName(Month(DateAdd("m", -10, Today()))),Nothing) OR
IIf(Fields!monthId.Value = 11 ,MonthName(Month(DateAdd("m", -11, Today()))),Nothing);
这是开关案例
=switch(Fields!monthId.Value = 0 ,MonthName(Month(DateAdd("m", 0, Today())))
,Fields!monthId.Value = 1 ,MonthName(Month(DateAdd("m", -1, Today())))
,Fields!monthId.Value = 2 ,MonthName(Month(DateAdd("m", -2, Today())))
,Fields!monthId.Value = 3 ,MonthName(Month(DateAdd("m", -3, Today())))
,Fields!monthId.Value = 4 ,MonthName(Month(DateAdd("m", -4, Today())))
,Fields!monthId.Value = 5 ,MonthName(Month(DateAdd("m", -5, Today())))
,Fields!monthId.Value = 6 ,MonthName(Month(DateAdd("m", -6, Today())))
,Fields!monthId.Value = 7 ,MonthName(Month(DateAdd("m", -7, Today())))
,Fields!monthId.Value = 8 ,MonthName(Month(DateAdd("m", -8, Today())))
,Fields!monthId.Value = 9 ,MonthName(Month(DateAdd("m", -9, Today())))
,Fields!monthId.Value = 10 ,MonthName(Month(DateAdd("m", -10, Today())))
,Fields!monthId.Value = 11 ,MonthName(Month(DateAdd("m", -11, Today()))))
但两者都给出了上述结果
但是我想要把这样的东西拿出来
请告诉我这里缺少的东西。 谢谢。