Microsoft SQL Reporting Services条件格式或表达式问题

时间:2022-06-17 16:52:42

I've been playing with MS Reporting services for the past few weeks in order to automate our "job status" reporting. I've been asked to highlight cells which are left blank or 0, so we can pick them up quicker.

过去几周,我一直在与MS Reporting services合作,以使我们的“工作状态”报告自动化。我被要求突出显示空白或0的单元格,这样我们可以更快地提取它们。

Take the "Enquiry Ref" columns on the below image. It'll only be any of the following:

以下图中的“查询编号”列为例。它只会是以下任何一种:

  • A Reference number
  • 一个参考号码
  • Blank
  • 空白
  • A number 0
  • 数字0

Microsoft SQL Reporting Services条件格式或表达式问题

I have tried the following:

我试过以下方法:

//This highlights the cells with 0
=IIF(Fields!EnquiryRef.Value = "0", "Yellow", "No Color")

//This highlights the cells which are blank
=IIF(Fields!EnquiryRef.Value = "", "Yellow", "No Color")

//This seems to highlight neither of the two
=IIF(Fields!EnquiryRef.Value = "0" OR Fields!EnquiryRef.Value = "", "Yellow", "No Color")

I can't seem to find an expression that covers both 0's and blanks.

我似乎无法找到一个表达式,它涵盖了0和空白。

1 个解决方案

#1


0  

Try a switch!

一个开关试试!

=Switch(Fields!Orders.Value < 100, "Red", Fields!Orders.Value < 500, "Green")

Just adjust it for your case and it should work fine!

只要根据你的情况调整一下就可以了!

#1


0  

Try a switch!

一个开关试试!

=Switch(Fields!Orders.Value < 100, "Red", Fields!Orders.Value < 500, "Green")

Just adjust it for your case and it should work fine!

只要根据你的情况调整一下就可以了!