Solved

Dynamically hide/show SSRS Report Parameter

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

Title # Comments Views Activity
SSMS Opening Mode 9 20
SQL create line numbers for data sampling 11 30
SQLCMD Syntax 2 16
SQL-Server Stored Procedure called from Access Front-end does nothing! 9 16
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

820 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