Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Displaying a null value as "0"

Author  Topic 

JB-KSC
Starting Member

2 Posts

Posted - 2007-10-29 : 11:49:22
I have a report that is displaying a "count" of data. some of the data values are "0", however in the report I only see a blank space. I tried the string located below in the Function Expression box, but it still did not work. Any thoughts would be greatly appreciated.

=Iif(IsNothing(Fields!Patched.Value),"0",Fields!Patched.Value)

Thanks,
J

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-29 : 12:00:39
use
select isnull(yourSum, 0)

in your select that returns the data

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

JB-KSC
Starting Member

2 Posts

Posted - 2007-10-29 : 12:02:38
Disregard....I figured it out. The working string is located below:

=Iif(Fields!Patched.Value = 0, "0", Fields!Patched.Value)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-30 : 01:56:33
quote:
Originally posted by JB-KSC

Disregard....I figured it out. The working string is located below:

=Iif(Fields!Patched.Value = 0, "0", Fields!Patched.Value)


How does it handle NULL?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -