Suming Dec problems
at the row level, below works by converting the text that is not formated for decimal as 0
=iif(IsNumeric(Fields!StaticDec.Value), Fields!StaticDec.Value, 0)
For the footer however none of the following are working
=sum(iif(IsNumeric(Fields!StaticDec.Value), Fields!StaticDec.Value, 0))
=sum(iif(IsNumeric(Fields!StaticDec.Value) = true, cded(Fields!StaticDec.Value), cdec(0)))
etc..
I dont understand why it would be a problem.
October 21st, 2010 5:38pm
Try this:
=IiF(IsNumeric(Fields!StaticDec.Value) = 1, Fields!StaticDec.Value, 0)
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 6:07pm
I solved my immediate problem by converting non numeric numbers to 0 on the SQL query side but I am still very curious why it would not work as one would predict on the SSRS side.
Thanks
October 21st, 2010 6:09pm
Hi,
The issue is caused because the field had 2 data types co-existed during the calculation runtime. As we know, the the IIF expression is based on Visual Basic.NET, which evaluates each argument individually, if one argument fails, the whole expression
fails. Beside the solution you have mentioned in your last reply, you also can write a custom code to solve it.
You can see the same topic at http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/94fcb267-fdc9-4f1a-a5d6-7486dd9265ae with
my repies.
thanks,
Jerry
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2010 8:50am