I am designing an rdlc report with VS 2008 and SQLServer 2008.
I want sum of a field on basis of some conditions into a textbox of my rdlc table.
I have written expression for a textbox as:
=SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
Fields!RevenueCapital.Value="Revenue Section" And
IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)
,CDec(Fields!CURRENTYEARAPPROVED_NONPLAN.Value),0)
)
Output: #Error
But when i am replacing bold fields from above with any number it is working fine as:
=SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
Fields!RevenueCapital.Value="Revenue Section" And
IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)
,1,0)
)
Ouput is: 36
=SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
Fields!RevenueCapital.Value="Revenue Section" And
IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)
,Fields!CURRENTYEARAPPROVED_NONPLAN.Value,0)
)
Programming to simplify, don't look for difficult way
Suwandi - Non Graduate Programmer
=SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
Fields!RevenueCapital.Value="Revenue Section" And
IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)
,CDec(Fields!CURRENTYEARAPPROVED_NONPLAN.Value),0)
)
I Resolved it as:
=SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND Fields!RevenueCapital.Value="Revenue Section"And IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value) ,CDec(Fields!CURRENTYEARAPPROVED_NONPLAN.Value),0.0D) )
Participant
1181 Points
405 Posts
#Error: How to resolve
Jan 11, 2013 03:00 AM|mishra.bhupesh|LINK
I am designing an rdlc report with VS 2008 and SQLServer 2008.
I want sum of a field on basis of some conditions into a textbox of my rdlc table.
I have written expression for a textbox as:
But when i am replacing bold fields from above with any number it is working fine as:
All-Star
52523 Points
15675 Posts
Re: #Error: How to resolve
Jan 11, 2013 03:23 AM|oned_gk|LINK
how about
Suwandi - Non Graduate Programmer
Participant
1181 Points
405 Posts
Re: #Error: How to resolve
Jan 11, 2013 03:56 AM|mishra.bhupesh|LINK
Thanks a lot.
I tried above.
Only in three rows it is giving exact values.
Rest of all are still #Error.
What can be the reseaon?
Participant
1181 Points
405 Posts
Re: #Error: How to resolve
Jan 11, 2013 04:17 AM|mishra.bhupesh|LINK
I Resolved it as: