all groups > sql server reporting services > may 2007 >
You're in the

sql server reporting services

group:

parameter


parameter farshad
5/29/2007 6:03:03 AM
sql server reporting services: Hi,
I have created several parameters in my report.
These parameters are drop down controls which are populated from stored
procedures.
How is it possible to populate one of these parameters based on the
selection on another parameter drop down control?
Re: parameter Ayman
5/29/2007 7:04:57 AM
[quoted text, click to view]

Yes it is. I'll give you a quick example and you can base your report
of it hopefully:

DataSet1 {This is your main dataset}

Select *
from cars_inventory
where make=@make and model=@model {here are you two parameter filters}

DataSet2

select distinct make
from cars_inventory

DataSet3
select distinct model
from cars_inventory
where make=@make

Make sure in your main dataset that @make comes first in the where
clause otherwise you will run into problems. Under the menu
Report>Report Parameters go to configure your parameters. Make both
of them queried (@make from dataset2 and @model from dataset3). That
should work. When you preview, model will be grayed out until you
select a make, then it will only pull back makes based on that model.
So for example you select Toyota for make, then under the model drop
down you will get a list {Camry, Corolla, etc}. If you select Nissan
you'll get a different list {Altima, Maxima, etc}.

I hope that helps.
AddThis Social Bookmark Button