June 4, 2013 at 8:28 am
Can SSRS evaluate a bit field without having to specify the comparison?
Example: =IIF( Fields!IsState.Value and Fields!RegionID.Value <>"12","Yes","No")
In this example IsState is a bit field and is not being compared to a value like RegionID is being compared to "12". Is this statement saying if IsState and RegionID is not equal to 12 then Yes else No. Or is IsState automatically being evaluated again "True" since nothing is explicitly specified to evaluate against it?
June 4, 2013 at 8:36 am
i believe this is the equivalent; the first test is evaluating whether it's boolean, so the first part of your test is just checking if the value is zero or non zero:
Example: =IIF( Fields!IsState.Value <> 0 and Fields!RegionID.Value <>"12","Yes","No")
Lowell
June 4, 2013 at 9:20 am
It is a boolean so I would imagine this is then evalutating IsState.Value <> False?
June 4, 2013 at 9:22 am
dawidajm (6/4/2013)
It is a boolean so I would imagine this is then evalutating IsState.Value <> False?
i believe under the covers , false is zero, and true is anything not zero, right? so there;s some implicit conversions going on to get it to fit into a boolean datatype.
Lowell
June 4, 2013 at 9:28 am
Lowell (6/4/2013)
dawidajm (6/4/2013)
It is a boolean so I would imagine this is then evalutating IsState.Value <> False?i believe under the covers , false is zero, and true is anything not zero, right? so there;s some implicit conversions going on to get it to fit into a boolean datatype.
False is zero and true is 1. I don't think it can be anything outside of 1 and still evaluate to true.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply