Using DBNull to Validate Hiding a Control
I have a real estate report that needs either a zip code or a city to run. Either one can be Null but not both. I want to display a message if both parameters are null. I'm trying to set the conditions for the hidden property on a textbox displaying my error message and the table displaying the data. If both parameters are null I want to hide the table and show the texbox. If either one is not null I want to hide the textbox and show the table. Hidden expression for table =System.DBNull.Equals(Parameters!Zip.Value) AND System.DBNull.Equals(Parameters!City.Value) Hidden expression for textbox =System.DBNull.Equals(Parameters!Zip.Value) OrElse System.DBNull.Equals(Parameters!City.Value) SSRS is telling me a reference to a nonshared member requires an object reference.
January 25th, 2011 6:34pm

Hi, Please try IsNothing(Parameters!Zip.Value) AND IsNothing(Parameters!City.Value) Remember to mark as an answer if this post has helped you.
Free Windows Admin Tool Kit Click here and download it now
January 25th, 2011 9:24pm

Hi, Please try the below. Set the hidden expression of the table to =(Parameters!city.Value is nothing) and (Parameters!city.Value is nothing) Set the hidden expression of textbox to =(not Parameters!city.Value is nothing) or (not Parameters!city.Value is nothing) Hope this helps.Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
January 25th, 2011 11:23pm

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

Other recent topics Other recent topics