Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / July 2008

Tip: Looking for answers? Try searching our database.

Show/Hide Tables based on parameters

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Burke - 15 Jul 2008 16:23 GMT
Has anyone created a report that shows/hides tables based on selections from
a parameter list?  For example, I have a report that has 10 tables, each one
summarizing sales and dollars based on various types within an attribute of a
product.  I want to allow the user to be able to select 1,2,3 or all 10
attibutes, then display the ones they select on the report.  

Has any one done this or changes attributes of a table, textbox, etc...
based on some parameter or even a value?

Any help would be greatly appreciated.

Thanks in advance for your help.

Tim
kbutterly - 15 Jul 2008 16:31 GMT
Tim,

Yes, I am doing that for matrices in a report I am designing, based on
an analysis services cube.

You need to get to the Visibility tab of  property dialog of the
table.

In the Expression box, you need to put your expression.  Note that
this is a totally non-intuitive expression, IMHO.  You are setting an
expression, which  must evaluate to True or False, for the Hidden
property, so if you want the table hidden, write the expression to
evaluate to True.

Does that help? If you need more detail, just ask.

Kathryn

On Jul 15, 11:23 am, Tim Burke <TimBu...@discussions.microsoft.com>
wrote:
> Has anyone created a report that shows/hides tables based on selections from
> a parameter list?  For example, I have a report that has 10 tables, each one
[quoted text clipped - 10 lines]
>
> Tim
Tim Burke - 15 Jul 2008 17:12 GMT
Kathryn,

I'm not sure if I did this correctly.  I created a multi-select parameter
called Attributes.  Then, in my first table, under the Visibility tab, I put
in the following expression:

=iif(Parameters!Attribute.Count=1,iif(Parameters!Attribute.Value(0)=1,true,false),false)

However, when I run the report, whether I select to show it or not, the
table still appears.

Am I missing something here?

Thanks again for your help!
Tim

> Tim,
>
[quoted text clipped - 30 lines]
> >
> > Tim
kbutterly - 15 Jul 2008 17:50 GMT
It's hard to say without knowing your report.  Here is where textboxes
come on handy.

Put some text boxes on the report, not on the table.

Set the value of the textboxes to =Parameters!Attribute.Count  and
=Parameters!Attribute.Value(0) to make sure you are getting the values
you expect.

On Jul 15, 12:12 pm, Tim Burke <TimBu...@discussions.microsoft.com>
wrote:
> Kathryn,
>
[quoted text clipped - 48 lines]
>
> - Show quoted text -
Tim Burke - 15 Jul 2008 19:55 GMT
Katheryn,

I have it working, but I have an issue with the multi-select.  Have you ever
tried to test if the table should be displayed based on a selction from the
multi-select?

Thanks,
Tim

> It's hard to say without knowing your report.  Here is where textboxes
> come on handy.
[quoted text clipped - 59 lines]
> >
> > - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.