SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 ssrs 2008 iif statement used to make column inv
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Constraint Violating Yak Guru

321 Posts

Posted - 01/02/2014 :  16:35:45  Show Profile  Reply with Quote
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?

Edited by - jassie on 01/02/2014 16:36:04

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 01/03/2014 :  01:17:49  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000