I m using following expression -
= iif(Fields!Alloc.Value=nothing,"NA",(Fields!QtyYr0.Value+Fields!QtyYr1.Value+
Fields!QtyYr2.Value +Fields!QtyYr3.Value+ Fields!QtyYr4.Value+
Fields!QtyYr5.Value+ Fields!QtyYr6.Value+ Fields!QtyYr7.Value)/
Fields!Alloc.Value)
It should print NA whenever Alloc.value is nothing, but it is
displaying NA only than when Alloc.value and sum of rest of fields,
both are null, if sum of rest of fields returns any value and
alloc.value returns null than it is printing #error
Any explanation or solution'
Thanks And RegardsI think this is pretty much VB.net code and therefore your evaluation
expression should use IS instead of =
iif(Fields!Alloc.Value IS nothing,"NA",(...
I hope this helps.
--
Jan D''Hondt
Jade bvba
Belgium
Database and .NET development
<Toto, I''ve got a feeling we''re not in Kansas anymore.>
"Techotsav" wrote:
> I m using following expression -
> => iif(Fields!Alloc.Value=nothing,"NA",(Fields!QtyYr0.Value+Fields!QtyYr1.Value+
> Fields!QtyYr2.Value +Fields!QtyYr3.Value+ Fields!QtyYr4.Value+
> Fields!QtyYr5.Value+ Fields!QtyYr6.Value+ Fields!QtyYr7.Value)/
> Fields!Alloc.Value)
> It should print NA whenever Alloc.value is nothing, but it is
> displaying NA only than when Alloc.value and sum of rest of fields,
> both are null, if sum of rest of fields returns any value and
> alloc.value returns null than it is printing #error
> Any explanation or solution'
> Thanks And Regards
>|||Look into using COALESCE. For example
COALESCE (Abbreviation, Name)
If Abbreviation is null, then display Name.
Good luck.|||replace nothing with "" perhaps that will do it?
Wednesday, February 15, 2012
evaluation of IIF
Labels:
database,
evaluation,
expression,
fieldsalloc,
fieldsqtyyr0,
fieldsqtyyr2,
following,
iif,
microsoft,
mysql,
oracle,
server,
sql,
value,
valuefieldsqtyyr1,
valuenothing
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment