Value is not null in SSRS
Hello Everyone, Can you tell how can i check the value of a textbox is not null using expressions in Reporting services. i have used the below one, but it didn't work. iif(Fields!days_overdue.value<>"", 1, 0) Thanks BPSReddy
October 1st, 2008 8:39pm

Here IsNothing returns a null value right. can u tell me how to use this for a Not Null
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2008 10:07pm

Hello again, IsNothing checks if field "Fields!days_overdue.Value" is null, but because I have put an "IIF" conditionin the expression it will check for NOT NULL, this is becuase if the conditon IsNothing(Fields!days_overdue.Value)is NULLit returns the value 1 otherwise if its NOT NULL it returns the value 0. These 1 and 0 values you can replace and put another dataset field for example.... Let me know if this is helpful.....
October 2nd, 2008 12:41am

Actually IsNothing returns a boolean value(true or false) and not a null value. To check for not null negate the result of IsNothing. For the initial thread question, IsNothing combined with IIF is the best solution in this case. =IIF(IsNothing(Fields!Product.Value),"NO","YES") "YES" and "NO" can be any values including a database field value. For example: =IIF(IsNothing(Fields!Product.Value),Fields!ProductName.Value,Fields!ProductCount.Value) IIF is just a method from Microsoft.VisualBasic and not a part of syntax and thus its not a ternary operator. -- http://www.habeebonline.com
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2009 9:54am

To check for not null negate the result of IsNothing. -- http://www.habeebonline.com How exactly do you negate the result of IsNothing? I need to use it in a switch statement where if one value is null and another is not null, then " " when both values are null, then " " else "something". I have googled and cannot find where to test for one value not null and the other null. Any help is appreciated. MargaretMargaret Norkett Database Administrator Commercial Foodservice Repair
August 4th, 2011 11:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics