开发者

iif statement in Reporting Services only including values in a group

开发者 https://www.devze.com 2022-12-13 11:59 出处:网络
In Reporting Services 2005 I have created a table that has a few groups in it开发者_JAVA百科. I would like to perform a rudimentary iif() on one of the columns in the group and though the Intellisense

In Reporting Services 2005 I have created a table that has a few groups in it开发者_JAVA百科. I would like to perform a rudimentary iif() on one of the columns in the group and though the Intellisense says I am formatting my iif() correctly, when I go to preview the report I am told I am missing my false part. In addition, the ',' after Value is underlined as a syntax error.

=Sum(iif((Fields!Repeat.Value, "Departments") = "*", 0, Fields!Hours_Earned.Value))

The group I am working with is called "Departments" and there is a nvarchar column that occasionally has a asterisk sign in it. If there is an asterisk anywhere in that column for this group, I want a 0 to be displayed, etc. Any ideas? It seems as though the first ',' is being misconstrued to be the ending of my expression in the iif(), but it is not, and it is inside parentheses.


The problem is that you only want to place the name of the group at the very end of the aggregation function. Switching to this format solved my problem:

=Sum(iif(Fields!Repeat.Value = "*", 0, Fields!Hours_Earned.Value), "Departments")
0

精彩评论

暂无评论...
验证码 换一张
取 消