[Solved] ASP.Net RDLC expression returning in #error

makumbi
 
on Aug 04, 2022 04:11 AM
490 Views

This function returns totals when no values are empty but when they are empty it returns #error

Please help how I can avoid #error

=Cint(iif(IsNothing(Fields!sstg2.Value),"",Fields!sstg2.Value)) +cint(iif(IsNothing(Fields!mathg2.Value),"",Fields!mathg2.Value)) +cint(iif(IsNothing(Fields!sceng2.Value),"",Fields!sceng2.Value)) +cint(iif(IsNothing(Fields!Eg2.Value),"",Fields!Eg2.Value))

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
PrinceG
 
on Aug 04, 2022 07:47 AM
on Aug 04, 2022 07:47 AM

Hi makumbi,

You are using CInt function. In expression you are setting Empty string. Empty String can not be converted to Integer.

That's why you are getting an error.

So you need to set to zero instead of empty string.

Please refer below expression