Expression - how to use and operator
Hi,
We are using SSRS 2005. In table row, hidden property expression, I need to check for 2 field values and then do toggling. Eg=
=IIF(Fields!Category.value = "ABC" AND Fields!Instr.Value = "EXT", true part, false part).
But, I am getting syntax error like red line showing that that is not properly formated.
Further, how to use not equal in conditions. Is this correct one != or <>
I appreciate your response.
Thanks,
Spunny
January 12th, 2011 5:29pm
Have you tried the values in single quotation marks?
Both inequality operators are valid.-- techChirag
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2011 6:07pm
Yes. It gives me red underline syntax error.
Thanks,
Spunny
January 12th, 2011 6:23pm
If that is your exact formula then it is likely that SSRS cannot parse true part or false part as they are not valid functions
=IIF(Fields!Category.value = "ABC" AND Fields!Instr.Value = "EXT", TRUE, FALSE)
This should also be fine:
=IIF(Fields!Category.value = "ABC" AND Fields!Instr.Value = "EXT", "true part", "false part")Rgds Geoff
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2011 6:55pm
If that is your exact formula then it is likely that SSRS cannot parse true part or false part as they are not valid functions
=IIF(Fields!Category.value = "ABC" AND Fields!Instr.Value = "EXT", TRUE, FALSE)
This should also be fine:
=IIF(Fields!Category.value = "ABC" AND Fields!Instr.Value = "EXT", "true part", "false part")Rgds Geoff
January 12th, 2011 6:55pm