Solved

Dynamically hide/show SSRS Report Parameter

Posted on 2014-09-25
1
645 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

770 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