Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 在IIF表达式中添加小数点后2位的格式?_Reporting Services_Ssrs 2008_Ssrs 2012 - Fatal编程技术网

Reporting services 在IIF表达式中添加小数点后2位的格式?

Reporting services 在IIF表达式中添加小数点后2位的格式?,reporting-services,ssrs-2008,ssrs-2012,Reporting Services,Ssrs 2008,Ssrs 2012,我需要这样的表达: =IIf(Count(Fields!counter.Value) > 0, 1 - Sum(Fields!validatedErrors.Value) / Count(Fields!counter.Value), 0) 再加上2位小数。不过我不知道该怎么做 我知道我可以补充 =Format(Fields!CUL1.Value,"F2") 它应该在正常值中附加2位小数。但是IIF把我甩了 我希望能够做到这样: =IIf(Count(Fields!counter.Val

我需要这样的表达:

=IIf(Count(Fields!counter.Value) > 0, 1 - Sum(Fields!validatedErrors.Value) / Count(Fields!counter.Value), 0)
再加上2位小数。不过我不知道该怎么做

我知道我可以补充

=Format(Fields!CUL1.Value,"F2")
它应该在正常值中附加2位小数。但是IIF把我甩了

我希望能够做到这样:

=IIf(Count(Fields!counter.Value) > 0, 1 - Format(Sum(Fields!validatedErrors.Value) / Count(Fields!counter.Value), 0),"F2")
田野!validatedErrors.Value=1352

计数(字段!计数器值),0)=1620

1352/1620=.8345

现在它的回报率是83%,这很好,但我想把它改为回报率83.45%

我也尝试过:

=IIf(Sum(Fields!DestElectronic.Value) > 0, Format(Sum(IIf(Fields!DestElectronic.Value = 1, 1, 0)) /Count(Fields!counter.Value), 0),"#0.00")


只需将输出单元格/文本框的format属性更改为“p2”,那么0.8345将被格式化为83.45%,而不做任何其他操作。没有必要在表达式中格式化它。天哪。我不是一个聪明人。谢谢。没问题,只要一切都这么简单就好了!尝试将文本框的格式设置为0.00%,以便在导出到Excel之类的文件时保留该格式。
=IIf(Sum(Fields!DestElectronic.Value) > 0, Format(Sum(IIf(Fields!DestElectronic.Value = 1, 1, 0)) /Count(Fields!counter.Value), 0),"#0.##")