Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am trying to convert the blank values and null values to zero in my report. I know how to handle null (by using isnothing )but my problem is how to handle blank and null in the same expression. I coulnt able to find a solution for it. Pls help.

Thank you in advance.
Posted
Updated 27-Mar-17 10:28am
v2
Comments
ZurdoDev 18-Dec-12 10:09am    
First off, you could handle this in SQL with either IsNull or COALESCE and a case statement. However, just use IIF. IIF(isnothing, 0, iif(isnull,0,field))

this may help you-
convert null to 0 in ssrs[^]
Using Custom Code References in Expressions (Reporting Services)[^]

ISNULL( fieldname, 0 )

or

IIF( fieldname IS NULL, 0, fieldname )
 
Share this answer
 
Another solution is:
IIF( fieldname = NOTHING, 0, fieldname )
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900