Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9012657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:03:35+00:00 2026-06-16T03:03:35+00:00

This question is about how to hide a column conditionally based on the values

  • 0

This question is about how to hide a column conditionally based on the values of a group that display on a single tab sheet. It is a follow on to this question, but it is really independent of. I am using SSRS 2008 R2.

My dataset is powered by a stored procedure and returns event-related data.

EventID | Event Owner | Event Type | Location
E001    | Bob         | Meeting    | Conf Rm A
E002    | Jane        | eTraining  | 
E003    | Bob         | Training   | Conf Rm B
E004    | Phil        | eTraining  | 
E005    | Jane        | Meeting    | Conf Rm B
E006    | Phil        | Meeting    | Conf Rm A
E007    | Jane        | eTraining  |

In my report I am using a table, not a matrix. I’ve got an innermost Detail row with details about the event, including the EventID and Location as columns.
There are several attributes by which I group the data.
The detail row and header row have a single row group assigned which groups by Event Owner and Event Type (GrpbyOwnerandType). There is a page break between each instance of the group, which results in the results appearing on separate pages on the report server and on separate tabs when downloaded to Excel (the ultimate goal). Therefore, the output in Excel is like this:

Tab 1 has E001 (Bob, Meeting) 
Tab 2 has E002 & E007 (Jane, eTraining)
Tab 3 has E003 (Bob, Training)
Tab 4 has E004 (Phil, eTraining)
Tab 5 has E005 (Jane, Meeting)
Tab 6 has E006 (Phil, Meeting)

On Tabs 2 and 4 I would like to hide the Location column because I feel silly displaying a completely blank column that is meaningless given then Event Type. I try to do this by setting column visibility to

=IIF(CountDistinct(Fields!EventLocation.Value, "GrpbyOwnerandType")= 0, True, False)

You can see that I’m specifying the scope here to just the group (GrpbyOwnerandType). If I do not specify the scope, then the test will clearly fail because there is at least one row in the dataset where the EventLocation is not NULL. However, when I specify the group in the scope of the IIF condition, the report preview fails with this error:

The Hidden expression for the tablix ‘X’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.

I used this same expression on the hidden attribute of the column and in that case, the report does not error out, but I’m left with an ugly white column on Tab 2 and Tab 4 because there is no data.

So, is there any way for me to hide the Location column on some but not all of the sheets?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:03:36+00:00Added an answer on June 16, 2026 at 3:03 am

    I asked this question on MSDN and was told it was not possible. I believe that to be true.

    I ended up creating two different tables, one with the columns I want and one without the columns, and I filter the data in each table to include the supported records.

    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/ef1ddac4-329f-43eb-b3fd-c226e7624ff6

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Follow up to this question about GNU make : I've got a directory, flac
I have a quick question about jQuery selectors. Is doing this: $('.class_el_1, .class_el_2').hide(); The
Clarification: this question is not about access modifier Confirmed that B.m() and b.m() statements
This question about Timers for windows services got me thinking: Say I have (and
Followed this question about delayed_job and monit Its working on my development machine. But
Note: I originally asked this question about an hour ago but only recently realized
I've this question about pass some instances by ref or not: here is my
I have seen this question about deploying to WebSphere using the WAS ant tasks.
This is sort of the Java analogue of this question about C# . Suppose
JD Long helped me with this: question about manual annotation . But is it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.