Reputation: 3101
I have webapplication having SSRS Reports inside..
In My .rdlc Report i have to make total of Positive values in the footer row..
so i have written following syntax in the column expression:
=SUM(IIF(CDec(Fields!Total.Value)>0,CDec(Fields!Total.Value),0))
when i run report.. it shows #Error
in the column value.....
however, if i write it to convert Fields!Total.Value
fields into int as follows, it works Correctly :
=SUM(IIF(Cint(Fields!Total.Value)>0,Cint(Fields!Total.Value),0))
what is the problem in first expression.. as i convert it into decimal it throws an error.
what is the solution ??? ( Fields!Total.Value
has decimal values)
Thanks
Upvotes: 0
Views: 734
Reputation: 364
Odd problem, it might be because your text box property is set for int not dec so when it gets a dec it throws an error. to change this property. Whenever I have to format a value I don't use convert but simply change the case of the text box. right click on the column => column properties => Number(tab) => number(select) (from there you can format it as you want)
Upvotes: 0