vba - Does the SSRS Switch function Evaluate the results of all conditions, as the IIF function does? -
many aware iif
function not "short circuit". does iif function compute both paths in ssrs or short-circuited?
so, switch
function not short circuit? in other words suppose have switch
:
switch(true, 5, false, 5/0)
contrived example of course.
will cause error because evaluate 5/0?
switch
doesn't short circuit. shows same behavior iif
evaluates conditions.
but expression switch(true, 5, false, 5/0)
won't show #error
.
it evaluate fine. show 5. 5/0 evaluate in ssrs infinity
not #error
.
a better test be
=switch(true,5,false,5/"")
when using above expression, ssrs evaluate #error
instead of 5.
Comments
Post a Comment