Friday May 5, 2006 02:02

Hiding a Report Parameter in SQL Server 2000 Reporting Services

Posted by rousso as SQL Server

Situation:

You use SQL 2000 Reporting Services, to create a report (probably same applies for SQL 2005, but I have not tried it yet).

You report expects various parameters but the user does not need to specify all of them through the user interface. For example the value of a parameter (say ParamB) can be calculated based on the value of another parameter (say ParamA) that the user selects.

So, you want to hide ParamB from the user.

Solution:

In the Report Parameters Collection Editor select the parameter that you want to hide and clear its “Prompt” field. Then add a Default Value to it (either by using an expression or by using a query).

Quick Tip:

 Notice that when you use a query to get the default value of the hidden parameter ParamB you can always pass to it the Value that the user selected for ParamA (or another parameter).

Comment Form

You must be logged in to post a comment.

blog comments powered by Disqus