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)
 Two conditions in report grouping visibility

Author  Topic 

cidr
Posting Yak Master

207 Posts

Posted - 2013-04-30 : 06:26:15
Hi All

Quick question.

I have two conditions on the report grouping visibility. The first condition is to hide only rows that only have NOTHING on a particular field, the second is based on a parameter which has two values (Yes and No). Yes to hide the grouping all together and No to show the grouping.

The first condition always applies and as such will never show rows that have NOTHING. I'm not sure if I can have both conditions on the visibility tab. Below is an idea of what I'm trying to do.

=IIF(Parameters!Action.Value= "Yes" ,True,False) and IIF(ISNOTHING(Fields!action.Value), True, False)

Does anyone know of a way to leverage both arguments?
Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-30 : 06:27:17
you need to write them as separate consitions in visbility tab.

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

cidr
Posting Yak Master

207 Posts

Posted - 2013-04-30 : 06:54:42
[code]
visakh 30/04/2013
you need to write them as separate conditions in visibility tab.
[/code]


Hi Visakh, I'm not sure what you mean. The conditions will be within the same expression container but if I write them as separate conditions (i.e. both with Equal sign) it wont work. Is this what you meant?

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-30 : 06:58:34
you want both condition to hold good or any one?

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

cidr
Posting Yak Master

207 Posts

Posted - 2013-04-30 : 07:02:28
visakh, I changed the first post slightly because it was slightly incorrect.

The first condition (yes or no) will hide the whole group.

The second condition will always apply; empty action field, hide the row. Using the grouping visibility for this forces a collapse of that row so there's no spaces between rows in the report.

Is it possible to have both conditions?
Go to Top of Page

cidr
Posting Yak Master

207 Posts

Posted - 2013-04-30 : 07:19:59
OR function seems to have worked but didn't seem to work before. I'll have to investigate.
Go to Top of Page
   

- Advertisement -