all groups > sql server reporting services > june 2005 >
You're in the

sql server reporting services

group:

Populate Paramerter txtBox based on another Parameter value


Populate Paramerter txtBox based on another Parameter value einman
6/13/2005 12:24:04 PM
sql server reporting services:
Hello everyone!

I am working on a little data dictionary report. I am loading up one of the
report parameters with all of the db names:

#1 Select RTrim(name) From master..sysDataBases Order By 1

Is there a way to then load another parameter txtbox with all of the table
name of the db that the user selected in #1?

RE: Populate Paramerter txtBox based on another Parameter value Mary Bray [SQL Server MVP]
6/13/2005 10:32:01 PM
From Reporting Services Books On Line:

Cascading Parameters
You can define a set of parameters where the list of values for one
parameter depends on the value chosen in another parameter. For example, the
first parameter could present a list of divisions within the company. When
the user selects a division, the second parameter is updated with a list of
departments within the division. A third parameter could then display a list
of employees within the selected department. The value for the employee
parameter could then be used to filter the report to a particular employee.
This process of filtering a list of parameter values based on a value from
another parameter is known as cascading, dependent, or hierarchical
parameters.

To create the cascading parameters in the above example, using queried
available values lists, do the following:

Create a dataset named Divisions containing a query that retrieves a list of
divisions. This should be a simple query, with columns for Division and
DivisionID, as in the following SQL query.
SELECT DivisionID, DivisionName FROM Divisions ORDER BY DivisionName
Create a dataset named Departments containing a query that retrieves a list
of departments, filtered by division, as in the following SQL query.
SELECT DepartmentID, DepartmentName FROM Departments WHERE DivisionID =
@Division ORDER BY DepartmentName
Create a dataset named Employees containing a query that retrieves a list of
employees, filtered by department, as in the following SQL query.
SELECT FirstName + ' ' + LastName AS EmployeeName, EmployeeID FROM Employees
WHERE DepartmentID = @Department ORDER BY LastName, FirstName
Edit the Division report parameter. The parameter already exists because the
@Division query parameter was used in the Departments dataset. Specify a
queried available values list that uses the Division dataset, setting the
label to DivisionName and the value to DivisionID.
Edit the Department report parameter. The parameter already exists because
the @Department query parameter was used in the Employees dataset. Specify a
queried available values list that uses the Department dataset, setting the
label to DepartmentName and the value to DepartmentID.
Create a new parameter and give it a name of Employee. Set the prompt to
"Employee". Specify an available values list that uses the Employees dataset,
setting the label to EmployeeName and the value to EmployeeID.
Use the value from the Employee parameter to filter the data in the report
to the employee.
For information about creating datasets, For information about creating
datasets, see Querying a Data Source. For information about creating and
modifying report parameters, see the above section titled "Adding a Report
Parameter."

The order of the parameters determines the order in which the parameters are
displayed on the report. Order is important for cascading parameters because
it also determines the order in which the parameter queries are run.
Parameters that are dependent on other parameters must be placed after the
parameters on they depend.



[quoted text, click to view]
RE: Populate Paramerter txtBox based on another Parameter value einman
6/14/2005 5:45:25 AM
Jens,Mary

Re: Populate Paramerter txtBox based on another Parameter value Jens Süßmeyer
6/14/2005 7:27:16 AM
They have something like event handling. You can depend one paramter box to
another, so the second is only filled if the first was filled. You can do
that by putting the Parameters!Something.Value in the definition of the
dataset which will be stuck to the parameter box.

Quering the system tables should only be used with the INFORMATION_SCHMEMA
Views:

Select Table_Name from INFORMATION_SCHEMA.Tables
Where TABLE_TYPE = 'BASE TABLE'

--
HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---
"einman" <einman@discussions.microsoft.com> schrieb im Newsbeitrag
news:73E3E151-6C40-40CD-9724-97D4AF533BE5@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button