在 SSRS/Report Builder 中,是否有评估占位符值的属性?

In SSRS/Report Builder, is there an attribute to evaluate placeholder value?

在构建 SSRS 报告时,我为其中一个 tablix 字段设置了一个表达式,如下所示:

=IIF(IsNothing(MyField.Value)=0,MyField.Value,"fubar")

因此,如果单元格中没有值,"fubar" 将作为占位符显示在单元格中。

我的问题:有没有办法在公式中计算这个占位符值?

例如,我想为所有包含 "fubar" 的单元格着色。我不能使用 MyField.Value 因为 "fubar" 在我的数据集中不是一个值,它只是一个占位符。是否有像 MyField.Placeholder 之类的属性或查看这些表面单元格值而不是实际数据集值的东西?

ReportItems!MyTextbox.ValueMe.Value 应该都能满足您的需求。所以要控制背景颜色,你可以使用:

=IIF(ReportItems!MyTextbox.Value = "fubar", "Pink", "White")

https://msdn.microsoft.com/en-us/library/dd255285(v=sql.105).aspx

您可以使用文本框的名称 属性 来引用单元格。

假设我有以下类似于你的表达式:

=IIF(Isnothing(Fields!Thing.Value),"Foo Bar", Fields!Thing.Value)

它会将 Foo Bar 放入 Thing 字段为空的单元格中。

如果我想为该单元格的背景颜色着色,我可以使用 ReportItems 集合来引用它。

=IIF(ReportItems!Textbox86.Value="Foo Bar","Red","Transparent")

Note Textbox86 is the cell where I used the first expression it will contain the hardcoded value Foo Bar when the Thing value is null.

要查看单元格的文本框名称 select,右键单击它并转到文本框属性,您将看到文本框#。

如果有帮助请告诉我。