Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Multi Paramter

Author  Topic 

jcwc888
Starting Member

1 Post

Posted - 2006-03-16 : 09:38:21
I want to use a dropdown parameter to actually populate another dropdown parameter ? As in department dropdown parameter populates the division dropdown parameter. Is it possible to do this in SQL Reporting Services 2000 ?

jhermiz

3564 Posts

Posted - 2006-03-16 : 10:47:26
This is a pretty basic requirement.

It involves 2 datasets, the first dataset does something to this effect:

SELECT Department FROM MyDepartments

The second dataset does the following:

SELECT Division FROM MyDivision WHERE Department = @Department

What this means is the second combo box cascades based on the first combo boxes value, ie. the second combo box depends on the value of the first combo box @Department. When you select a department RS passes the @Department value to the second dataset and filters the divisions based on the department selected. That way your second combo box filters based on the value of your first combo box.

Once you create the two datasets and set the stored procedure name for the dataset you will notice that rs automatically creates the parameter when you go to the menu at the top report parameters. Then just set the text to whatever you want it to say, tell it it is a string (or number whatever your fields are). Then run the report it should work fine.

Ideally you want n datasets based on n-1 parameters plus the dataset for the actual report. What I mean by this is lets say you were writing a report that displayed cars based on Type and SubType. Let us say Type is the main type such as ford, chrysler, GM, bmw. And let us say subtype are the actual types of cars such as for ford: Mustang, Breeze, Focus, etc, Chrysler: magnum, 300m, etc...and on and on.

You would want a dataset for the type: (GM, Chrysler, Ford), a dataset for the subtype (Mustang, 300M All pointing back to their respective types), and finally one last dataset for the actual report as well that takes as a parameter the type and subtype. So you have 2 parameters (type, and subtype) and 3 datasets.

Does this help ?


Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]

RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url]
Go to Top of Page
   

- Advertisement -