Solved

Dynamically hide/show SSRS Report Parameter

Posted on 2014-09-25
1
588 Views
Last Modified: 2015-09-26
Hello,

I have 2 report parameters in SSRS - For eg, say EmpId and DeptId. The user could enter either EmpId or DeptId.
If they enter a value for EmpId, I want the next report parameter which is DeptId to be disabled.
Only when they do not enter anything for the EmpId, I want the DeptId report parameter to be enable for them to type an id into it.
I do not think there is a way to hide/show a report parameter dynamically.
But is there a workaround for this?

Thanks!
0
Comment
Question by:sath350163
1 Comment
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 40345474
As you've indeed discovered, parameters cannot be hidden dynamically: they are either visible or not at all.

But there are a couple of ways you can implement your report and achieve similar results.  I would probably implement only one parameter that allows users to enter a value and I'd implement a second parameter that indicates what the entered value represents: EmpID or DeptID.  Make this second parameter a simple dropdown.  You then take this selection into account in your query.

Another option, a bit less interesting in my opinion, is to display a message to the user when a wrong combination has been entered.  This is a simple textbox on the report that is only shown in case of an invalid combination.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
how to fix this error 14 48
Optimize/Performance Tune Production Databases 11 42
Sql query 34 22
Convert SP in a format for debugging 7 13
Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now