all groups > sql server reporting services > september 2005 >
You're in the

sql server reporting services

group:

aggregate function in IIF?


aggregate function in IIF? siddiqins
9/16/2005 4:27:11 PM
sql server reporting services: hello,
I am trying to use aggregae function within IIF clause. I am trying
to run this code
=iif( Fields!CLIENTID1.Value=Fields!CLIENTID2.Value,0,count(
Fields!CLIENTID1.Value ). It gives me an error that aggregate functions
cannot be used in report parameter expression.
Can any one help me to solve this problem.

Thanks
RE: aggregate function in IIF? שובל
9/18/2005 6:34:02 AM
try the other way round:
COUNT(iif(Fields!CLIENTID1.Value=Fields!CLIENTID2.Value,0,Fields!CLIENTID1.Value))

[quoted text, click to view]
RE: aggregate function in IIF? Koen
9/21/2005 11:52:02 PM
=iif( Fields!CLIENTID1.Value=Fields!CLIENTID2.Value,0,count(
Fields!CLIENTID1.Value ). It gives me an error that aggregate functions

It looks like you are missing the closing bracket of the count function. try
this:

=iif( Fields!CLIENTID1.Value=Fields!CLIENTID2.Value,0,count(
Fields!CLIENTID1.Value )). It gives me an error that aggregate functions

[quoted text, click to view]
AddThis Social Bookmark Button