Wednesday, March 7, 2012

Hierarchical parameters

Hi all,
does anyone know if it is possible within sql server 2000 to create
dependent parameters ? Eg : i have one parameter "City". If a user selects a
ceratin city, i would want to see the other parameter "Street" being filled
with alle the available streets...
I thought i read somewhere that this is possible in sql server 2005, but I'm
not quite sure...
Thanks!Yes you can have cascading parameters... TO do this
1. Create a dataset which populates the second parameter...ie
select Streetname, streetid from mytable where City = @.city
Where city is the name of your city parameter...
2. Then in the Report Parameters window create the Street parameter, and
have it use the new dataset
3. Ensure the Street parameter comes AFTER the CITY parameter in the
parameter list...
Then you can use both City and Streetname in your dataset query to populate
the report...
Hope this helps
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Koen" wrote:
> Hi all,
> does anyone know if it is possible within sql server 2000 to create
> dependent parameters ? Eg : i have one parameter "City". If a user selects a
> ceratin city, i would want to see the other parameter "Street" being filled
> with alle the available streets...
> I thought i read somewhere that this is possible in sql server 2005, but I'm
> not quite sure...
> Thanks!|||Thanks Wayne,
gonna try it out later this day...
Koen
"Wayne Snyder" wrote:
> Yes you can have cascading parameters... TO do this
> 1. Create a dataset which populates the second parameter...ie
> select Streetname, streetid from mytable where City = @.city
> Where city is the name of your city parameter...
> 2. Then in the Report Parameters window create the Street parameter, and
> have it use the new dataset
> 3. Ensure the Street parameter comes AFTER the CITY parameter in the
> parameter list...
> Then you can use both City and Streetname in your dataset query to populate
> the report...
> Hope this helps
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "Koen" wrote:
> > Hi all,
> >
> > does anyone know if it is possible within sql server 2000 to create
> > dependent parameters ? Eg : i have one parameter "City". If a user selects a
> > ceratin city, i would want to see the other parameter "Street" being filled
> > with alle the available streets...
> >
> > I thought i read somewhere that this is possible in sql server 2005, but I'm
> > not quite sure...
> >
> > Thanks!

No comments:

Post a Comment