SSRS表达式替换为NA的NA

时间:2015-07-15 21:02:27

标签: reporting-services ssrs-2008 ssrs-expression

我是下面提供的SSRS表达式。该表达式的问题在于,当第一列值为#VALUE!时,最后一列有时会显示NA。它基本上无法计算 如何修复此表达式以使其显示正确的数值?一种可能的解决方案是将0替换为NA,但我该如何实现?

表达:

  

= iif(Fields!NumType.Value =" 1",iif(reportItems!txt_Current_Filing_Firm.value =""," 0",reportItems!txt_Current_Filing_Firm .value)," 1") - IIF(字段!NumType.Value =" 1",iif(reportitems!txt_Compare_Filing_Firm.value ="",&# 34; 0"!,reportitems txt_Compare_Filing_Firm.value)" 1&#34)

SSRS中的当前输出:

Column 1 | Column 2 |  Column 3

NA          3456.00    #VALUE!
NA        347856.00    #VALUE!
NA      98763456.00    #VALUE!
NA         33456.35    #VALUE!

SSRS的预期输出:

Column 1 | Column 2 |  Column 3

0          3456.00    -3456.00
0        347856.00    -347856.00
0      98763456.00    -98763456.00
0         33456.35    -33456.35

1 个答案:

答案 0 :(得分:0)

这是解决方案。想分享。我们需要更换" NA"有0.它有效!

= iif(Fields!NumType.Value =" 1",iif(reportItems!txt_Current_Filing_Firm.value ="" OR reportItems!txt_Current_Filing_Firm.value =" NA&# 34;," 0",reportItems!txt_Current_Filing_Firm.value)," 1") - IIF(字段!NumType.Value =" 1",iif(reportItems! txt_Current_Filing_Firm.value =""或报告项目!txt_Compare_Filing_Firm.value =" NA"," 0",reportitems!txt_Compare_Filing_Firm.value)," 1&# 34)