0

这是我的矩阵的设计视图,它使用一系列数据集,表达式使用查找

在此处输入图像描述

这是运行时的报告。我想在结尾列添加一些条件格式

在此处输入图像描述

条件格式取决于人的姓名,然后是该字段中的总计。以下是我尝试过的。我希望只有希拉里的细胞会显示颜色。然而,其他人则显示为绿色。

 =switch(Fields!Name.value = "Hilary" and 
  reportitems!Textbox62.value >=0 and reportitems!Textbox62.value <= 9,"#fd6767", 
  reportitems!Textbox62.value >=10 and reportitems!Textbox62.value <=19, "#f8d3a9", 
  reportitems!Textbox62.value >= 20 and reportitems!Textbox62.value <=100,"LightGreen")

在此处输入图像描述

4

1 回答 1

1

如果我理解正确,所有其他名称都应该使单元格背景为空白,不是吗?在这种情况下,您必须为每一行添加条件“Name=Hilary”。在你的表达中,这个只与第一行有关。试试这个:

=switch(
  Fields!Name.value = "Hilary" and reportitems!Textbox62.value >=0 and reportitems!Textbox62.value <= 9,"#fd6767", 
  Fields!Name.value = "Hilary" and reportitems!Textbox62.value >=10 and reportitems!Textbox62.value <=19, "#f8d3a9", 
  Fields!Name.value = "Hilary" and reportitems!Textbox62.value >= 20 and reportitems!Textbox62.value <=100,"LightGreen")
于 2018-11-22T13:15:44.657 回答