Solved

Dynamically hide/show SSRS Report Parameter

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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

734 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