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
 General SQL Server Forums
 New to SQL Server Programming
 Question on IIF statement.

Author  Topic 

steve4134
Starting Member

24 Posts

Posted - 2011-04-06 : 14:14:48
I am using visual studio 2005 with a sql 2005 back end. I am working on a report and trying to use some conditional logic with visibility. What i want to do is when this record has information there to have the info show. And when there is a null not to show up at all. I thought I would need a simple iff and call it a day but for some reason it is not liking my statement. So my statement follows. What i want is if fields_due date is = to null then there be nothing and when its not to show the info.Any help would be appreciated

Steve



=iif([Fields!due_date.Value] null ," ",[Fields!due_date.Value]






steve4134
Starting Member

24 Posts

Posted - 2011-04-06 : 14:38:08
Or maybe i need an isnull ?????
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2011-04-06 : 15:02:17
Not sure if it was a typo when you posted, but the correct syntax should be

iif([Fields!due_date.Value] = Nothing," ",[Fields!due_date.Value])


My knowledge of SSRS is very limited - I am basing this on my passing familiarity with VB.
Go to Top of Page
   

- Advertisement -