Monday, March 26, 2012

Multi-select parameter in SQL Server Rptg Svcs 2005

I am using a beta version of reporting services 2005.
I have created my report parameters as multi-select. However, I'm having
trouble having the query parameters accept the list that the report
parameters passes. (below) I tried replacing the = with in and between and
neither work. It doesn't like the comma between the multiple values. I
can't imagine that they've allowed multi-select report parameters without a
way to pass them cleanly to the query parameters.
Any help would be greatly appreciated. Thank you in advance for any help.
Machelle
Select * from candidate_info
where (recruiting_year in @.p_Year) and
(candidate_type_display in @.p_candidate_type) and
(degree_level in @.p_degree) and
(owner_site_code in @.p_site_owner) and
(offer_job_grade in @.p_grade)Try putting parenthese around the parameter like you normally would if you
were providing a hardcoded list ie
Select * from candidate_info
> where (recruiting_year in (@.p_Year)) and
> (candidate_type_display in (@.p_candidate_type)) and
> (degree_level in (@.p_degree)) and
> (owner_site_code in (@.p_site_owner)) and
> (offer_job_grade in (@.p_grade))
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Machelle" <Machelle@.discussions.microsoft.com> wrote in message
news:3EF55E31-2626-4B24-86FD-97E087999FF8@.microsoft.com...
>I am using a beta version of reporting services 2005.
> I have created my report parameters as multi-select. However, I'm having
> trouble having the query parameters accept the list that the report
> parameters passes. (below) I tried replacing the = with in and between and
> neither work. It doesn't like the comma between the multiple values. I
> can't imagine that they've allowed multi-select report parameters without
> a
> way to pass them cleanly to the query parameters.
> Any help would be greatly appreciated. Thank you in advance for any help.
> Machelle
> Select * from candidate_info
> where (recruiting_year in @.p_Year) and
> (candidate_type_display in @.p_candidate_type) and
> (degree_level in @.p_degree) and
> (owner_site_code in @.p_site_owner) and
> (offer_job_grade in @.p_grade)
>|||I love it when it's a simple answer - thanks Wayne I really appreciate your
taking the time to answer my question.
"Wayne Snyder" wrote:
> Try putting parenthese around the parameter like you normally would if you
> were providing a hardcoded list ie
> Select * from candidate_info
> > where (recruiting_year in (@.p_Year)) and
> > (candidate_type_display in (@.p_candidate_type)) and
> > (degree_level in (@.p_degree)) and
> > (owner_site_code in (@.p_site_owner)) and
> > (offer_job_grade in (@.p_grade))
>
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Machelle" <Machelle@.discussions.microsoft.com> wrote in message
> news:3EF55E31-2626-4B24-86FD-97E087999FF8@.microsoft.com...
> >I am using a beta version of reporting services 2005.
> >
> > I have created my report parameters as multi-select. However, I'm having
> > trouble having the query parameters accept the list that the report
> > parameters passes. (below) I tried replacing the = with in and between and
> > neither work. It doesn't like the comma between the multiple values. I
> > can't imagine that they've allowed multi-select report parameters without
> > a
> > way to pass them cleanly to the query parameters.
> >
> > Any help would be greatly appreciated. Thank you in advance for any help.
> >
> > Machelle
> >
> > Select * from candidate_info
> > where (recruiting_year in @.p_Year) and
> > (candidate_type_display in @.p_candidate_type) and
> > (degree_level in @.p_degree) and
> > (owner_site_code in @.p_site_owner) and
> > (offer_job_grade in @.p_grade)
> >
>
>

No comments:

Post a Comment