Add two columns value in ASP.Net RDLC expression

makumbi
 
on Jul 15, 2022 07:51 AM
441 Views

When i add using the above function i get 87 which is wrote where i add 8 plus 9 it gives me 87.

When i try to add these values after conversion i don't get the right figure.

=IIF((Fields!maths1.Value) > 0,Code.Grading(Fields!maths1.Value),"")+IIF((Fields!scen1.Value) > 0,Code.Grading(Fields!scen1.Value),"")
ENG MTC SCI SST R.E COMP TOTAL AGG DIV    
BEG TERM 42 8 42 8 37 9 47 7     69 4 168 87 4  
MID TERM 47 7 30 9 43 8 65 4         185   4
Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Jul 15, 2022 07:57 AM

Hi makumbi,

You need to convert the parameter value before the addition operation.

Use below expression.

=CInt(IIF((Fields!maths1.Value) > 0, Code.Grading(Fields!maths1.Value), "0")) + CInt(IIF((Fields!scen1.Value) > 0, Code.Grading(Fields!scen1.Value), "0"))