SSRS - nested IIF in the expression

15.2k views Asked by At

=iif((Fields!Company_OEM.Value = "Channel") AND (Parameters!paramCompanyOEM.Count < 2), "None", iif(Not(Fields!Company_OEM="Channel"), Count(Fields!TS_ISSUEID.Value), "None"))

Error shows and unable to run the report

Suppose the conditions (first iif) statement lies to the true part which is "None". The false part lies to the second iif statement.

Any guide? Thanks

3

There are 3 answers

0
Diego On

try:

Count(Fields!TS_ISSUEID.Value).toString()
0
Nasser Hadjloo On

Check this out

=IIF((Fields!Company_OEM.Value = "Channel") AND (Parameters!paramCompanyOEM.Count < 2), "None", IIF(Not(Fields!Company_OEM="Channel"), Count(Fields!TS_ISSUEID.Value).ToString(), "None")) 

Let me know if your problem resolved or not

0
H B On

It seems you are missing a ".Value" at the second test for "Channel". (Happens to me all the time)

=iif((Fields!Company_OEM.Value = "Channel") AND (Parameters!paramCompanyOEM.Count < 2), "None", iif(Not(Fields!Company_OEM.Value="Channel"), Count(Fields!TS_ISSUEID.Value), "None"))