Try:
=IIf(
InStr(Join(Parameters!ProvinceID.Value, ", "), "0") > 0
,True
,IIf(
InStr(Join(Parameters!ProvinceID.Value, ", "), Fields!ProvinceID.Value) > 0,
,True
,False
)
)
InStr
will return an integer value of the position where the string searched for starts (if found). Therefore your boolean tests (1st argument of the IIf()
function) need to determine if a number equal to or greater than 1 has been returned.
- As you are searching for a string, the
0
being searched for in the string must be coded as "0"
.
- If
Fields!ProvinceID.Value
returns an integer, then it too must be converted to a string using the CStr()
function like so:
=IIf(
InStr(Join(Parameters!ProvinceID.Value, ", "), "0") > 0
,True
,IIf(
InStr(Join(Parameters!ProvinceID.Value, ", "), CStr(Fields!ProvinceID.Value)) > 0,
,True
,False
)
)