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
 How do I make a NULL textbox 0.

Author  Topic 

gcowhsu
Starting Member

38 Posts

Posted - 2005-02-21 : 20:32:34
I am dealing with currency and my query returns null for some of the values. I would like it to display $0.00 instead of showing a blank field.

I know you have to go into the expression and put some kind of if statement in there, but I do no know any syntax for programming the reporting services designer expressions.

thanks

Michael Hsu

DustinMichaels
Constraint Violating Yak Guru

464 Posts

Posted - 2005-02-21 : 21:39:13
You may want to use the ISNULL or COLLASCE function. With these functions you can convert a null value into another one.

SELECT ISNULL(<Your Null Column>, '0.00')
FROM <Your Table>
WHERE Blah blah

Dustin Michaels
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-02-22 : 12:22:28
Dustin, that would work for T-SQL, but his question has to do with a field inside a report in Reporting Services.

Here is how I handle NULLs in the report:

= IIF(Len(Fields!DriverGroup.Value) < 1, "<No Driver Group>", Fields!DriverGroup.Value)

Tara
Go to Top of Page

gcowhsu
Starting Member

38 Posts

Posted - 2005-02-22 : 13:19:59
thanks for the help guys, it is working properly now.

Michael Hsu
Go to Top of Page
   

- Advertisement -