图例值为 0(零)时在 SSRS 报告中显示所有图例文本

Display All Legend text in SSRS report when legend value is 0(Zero)

我是 SSRS 报告的新手,谁能提供有关 SSRS 饼图图例的信息 "Display All Legend text in SSRS report when legend value is 0(Zero)"

我在报表中设置了这个表达式

=IIF(Sum(Fields!Delaymonth1_12.Value) = 0, nothing, sum(Fields!Delaymonth1_12.Value))

但我的报告没有显示所有图例,我使用像

这样的直接值
=Sum(Fields!Delaymonth1_12.Value)

然后在报告中显示 0(零)值

请检查图像:第一个图像显示没有图例,第二个图像显示所有图例但显示 0(零)

右键单击 > 图表上每个系列的属性。然后在图例选项卡上,单击文本 "Do not show this series in a legend" 旁边的表达式按钮 然后使用此表达式:

=IIF(Sum(Fields!Delaymonth1_12.Value) = 0, TRUE, FALSE)