Will F
Will F

Reputation: 437

IIF statement using BETWEEN

The following IIF expression isn't working for me:

IIF(Fields!Number.Value BETWEEN 1 AND 1000, Fields!Number.Value, "all ok")

Basically I want to list the value if it falls within 1 and 1000 and show 'all ok' if it doesn't.

Please can you advise where I've gone wrong as this is throwing an error.

Thanks

Upvotes: 4

Views: 17472

Answers (1)

Ian Preston
Ian Preston

Reputation: 39586

SSRS does not support BETWEEN as far as I can tell.

enter image description here

Just use equivalent >= and <= checks:

=IIf(Fields!Number.Value >= 1 and Fields!Number.Value <= 1000
  , Fields!Number.Value
  , "All OK")

Upvotes: 7

Related Questions