since the IIF statement evaluates both the true and false conditions
regardless... I need to find a replacement to it...
my code is:
=IIF(Fields!SOURCE_TRANSACTION_KEY.Value = nothing, "", Fields!
SOURCE_TRANSACTION_KEY.Value.TOSTRING.SUBSTRING(3, 2))
I get the #ERROR value in my report for values that are null since the
SUBSTRING of a NULL value generates an error.
I've tried CHOOSE and the SWITCH and they behaved as IIF.
I do not want to handle this on the server side.
Any ideas?
Thanksyou're really better off modifying the query code to replace NULLS with blank
strings before the rpt code even looks at it. anything else will be an epic
kludge.
"roy@.mgk.com" wrote:
> since the IIF statement evaluates both the true and false conditions
> regardless... I need to find a replacement to it...
> my code is:
> =IIF(Fields!SOURCE_TRANSACTION_KEY.Value = nothing, "", Fields!
> SOURCE_TRANSACTION_KEY.Value.TOSTRING.SUBSTRING(3, 2))
> I get the #ERROR value in my report for values that are null since the
> SUBSTRING of a NULL value generates an error.
> I've tried CHOOSE and the SWITCH and they behaved as IIF.
> I do not want to handle this on the server side.
> Any ideas?
> Thanks
>|||On Sep 26, 5:20 pm, Carl Henthorn
<CarlHenth...@.discussions.microsoft.com> wrote:
> you're really better off modifying the query code to replace NULLS with blank
> strings before the rpt code even looks at it. anything else will be an epic
> kludge.
> "r...@.mgk.com" wrote:
> > since the IIF statement evaluates both the true and false conditions
> > regardless... I need to find a replacement to it...
> > my code is:
> > =IIF(Fields!SOURCE_TRANSACTION_KEY.Value = nothing, "", Fields!
> > SOURCE_TRANSACTION_KEY.Value.TOSTRING.SUBSTRING(3, 2))
> > I get the #ERROR value in my report for values that are null since the
> > SUBSTRING of a NULL value generates an error.
> > I've tried CHOOSE and the SWITCH and they behaved as IIF.
> > I do not want to handle this on the server side.
> > Any ideas?
> > Thanks
argh! was hoping to avoid that...|||And what about this?
=IIF(Fields!SOURCE_TRANSACTION_KEY.Value = nothing, "", Mid ("" &
Fields!SOURCE_TRANSACTION_KEY.Value,3, 2)
Hope this helps.
<roy@.mgk.com> escribió en el mensaje
news:1190895795.174272.317940@.g4g2000hsf.googlegroups.com...
> On Sep 26, 5:20 pm, Carl Henthorn
> <CarlHenth...@.discussions.microsoft.com> wrote:
>> you're really better off modifying the query code to replace NULLS with
>> blank
>> strings before the rpt code even looks at it. anything else will be an
>> epic
>> kludge.
>> "r...@.mgk.com" wrote:
>> > since the IIF statement evaluates both the true and false conditions
>> > regardless... I need to find a replacement to it...
>> > my code is:
>> > =IIF(Fields!SOURCE_TRANSACTION_KEY.Value = nothing, "", Fields!
>> > SOURCE_TRANSACTION_KEY.Value.TOSTRING.SUBSTRING(3, 2))
>> > I get the #ERROR value in my report for values that are null since the
>> > SUBSTRING of a NULL value generates an error.
>> > I've tried CHOOSE and the SWITCH and they behaved as IIF.
>> > I do not want to handle this on the server side.
>> > Any ideas?
>> > Thanks
> argh! was hoping to avoid that...
>
Showing posts with label iif. Show all posts
Showing posts with label iif. Show all posts
Wednesday, March 7, 2012
Null Values
How can I sepcify a NULL value in a formula? I tried this but it told me to
use system.dbnull and that doesn't work either
=Iif( Fields!c_first_name.Value = NULL, Fields!c_last_name.Value,
Fields!c_first_name.Value)
THanks,Hi,
Replace 'Null' with 'Nothing' and it should work.
hth,
Pieter
"Eric" <Eric@.discussions.microsoft.com> wrote in message
news:70E8E267-D5C8-486D-8D89-931AACC876D3@.microsoft.com...
> How can I sepcify a NULL value in a formula? I tried this but it told me
> to
> use system.dbnull and that doesn't work either
> =Iif( Fields!c_first_name.Value = NULL, Fields!c_last_name.Value,
> Fields!c_first_name.Value)
>
> THanks,
use system.dbnull and that doesn't work either
=Iif( Fields!c_first_name.Value = NULL, Fields!c_last_name.Value,
Fields!c_first_name.Value)
THanks,Hi,
Replace 'Null' with 'Nothing' and it should work.
hth,
Pieter
"Eric" <Eric@.discussions.microsoft.com> wrote in message
news:70E8E267-D5C8-486D-8D89-931AACC876D3@.microsoft.com...
> How can I sepcify a NULL value in a formula? I tried this but it told me
> to
> use system.dbnull and that doesn't work either
> =Iif( Fields!c_first_name.Value = NULL, Fields!c_last_name.Value,
> Fields!c_first_name.Value)
>
> THanks,
Subscribe to:
Posts (Atom)