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
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 ssrs 2008 iif statement used to make column inv

Author  Topic 

jassie
Constraint Violating Yak Guru

332 Posts

Posted - 2014-01-02 : 16:35:45
In an ssrs 2008 report, I want a certain column not to be visible under certain conditions.

If I would try to write that code in sql, the code looks like the following:

(ISNULL(left(dbo.Customer.num,1),'') In ('0','1') and ISNULL(dbo.Customer.num,'') NOT IN ('0XY','111','133','187'))

Can you tell when how to write the above statement in an iif statement in ssrs to make the column be invisible?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-03 : 01:17:49
Set an expression like below for hidden property
=IIf((Left(Fields!CustomerNum.Value,1) = "0" Or Left(Fields!CustomerNum.Value,1) = "1") And Not(Fields!CustomerNum.Value = "0XY" Or Fields!CustomerNum.Value = "111" Or Fields!CustomerNum.Value = "133" Or Fields!CustomerNum.Value = "187"),True,False)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -