Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Error# message occasionally instead of values.

Author  Topic 

sachya45
Starting Member

25 Posts

Posted - 2009-06-24 : 17:01:00
Hi All,
I am trying to do some conditional calculation for one of my group footer total.
I am getting the correct results. but sometimes I get the Error# message instead of the value.
can anyone suggest why?
here is my code..

=(CDBL(((Fields!A.Value)+ sum(IIF(Fields!TD.Value="04",B.Value,00))))-
((C.Value)+ sum(IIF(Fields!TD.Value>="05",B.value,00))))

Thank You.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-25 : 14:34:20
are you sure that fields A, TD,.. will always contain numerical values?
Go to Top of Page

sachya45
Starting Member

25 Posts

Posted - 2009-06-29 : 15:07:20
Thanks for your quick reply.
and yes TD.value (var char) and A.value(money) both are numeric fields.
But i figured out what is the problem.
As I am trying to do sum at group footer ,if there are records of different TD.value(like 04,05,06 ) all in same group , then only I am getting error message.
If I get records of only 04 or only 05 then footer total is correct.

Now my question is can i name a column with calculative field and use value of that column at group footer. so that i don't have to do conditional calculations at group footer.
I really appreciate your quick response .
Thanks Again..
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-30 : 13:35:27
you mean create a calculated field within report? if yes its possible, but you can use fields only inside same scope (table,matrix) on detail part
Go to Top of Page

sachya45
Starting Member

25 Posts

Posted - 2009-06-30 : 13:45:47
Yes, calculative fields within report table and use that in the same report table footer. How to define calculative table column.and how to use that in table footer? coz i want to avoid long nested calculated totals at the footer.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-30 : 14:02:26
i dont think you can use it in footer
Go to Top of Page
   

- Advertisement -