Solved

Dynamically hide/show SSRS Report Parameter

Posted on 2014-09-25
1
831 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how the fundamental information of how to create a table.

634 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