In the report parameters dialogue box I have set up a Non Queried list, when
someone selects Grand Rapids(label) I want to return multiple values, 21 OR
22 OR 23, these are the Grand Rapids Department ID's. Can this be done? If
so what is the correct syntax?
Label Value
Grand Rapids 21 OR 22 OR 23
WHERE (Acclaim.Staff.DepartmentID = @.DepartmentID)Why not make it a string parameter that returns "21,22,23"
and make the where clause like:
WHERE (Acclaim.Staff.DepartmentID in @.DepartmentID)
--
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.
"Sampson" <Sampson@.discussions.microsoft.com> wrote in message
news:F361919F-A515-4AE2-B7FA-0D68B6842542@.microsoft.com...
> In the report parameters dialogue box I have set up a Non Queried list,
when
> someone selects Grand Rapids(label) I want to return multiple values, 21
OR
> 22 OR 23, these are the Grand Rapids Department ID's. Can this be done?
If
> so what is the correct syntax?
> Label Value
> Grand Rapids 21 OR 22 OR 23
>
> WHERE (Acclaim.Staff.DepartmentID = @.DepartmentID)
>|||That will not work.You would think it would but it doesn't (most likely on
purpose to prevent injection attacks). You can do a dynamic query. Go into
generic query mode and do this:
= "Select blah from sometable where (Acclaim.Staff.DepartmentID in (" &
Parameters!DepartmentID.value & ")"
Of course if it is not a list of integers you then need to add parse this
(you could write code behind to do this) and put in the single quotes.
The other alternative is pass the parameter to a stored procedure and do it
from there.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:uAOOxf2RFHA.2528@.TK2MSFTNGP10.phx.gbl...
> Why not make it a string parameter that returns "21,22,23"
> and make the where clause like:
> WHERE (Acclaim.Staff.DepartmentID in @.DepartmentID)
> --
> 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.
> "Sampson" <Sampson@.discussions.microsoft.com> wrote in message
> news:F361919F-A515-4AE2-B7FA-0D68B6842542@.microsoft.com...
> > In the report parameters dialogue box I have set up a Non Queried list,
> when
> > someone selects Grand Rapids(label) I want to return multiple values, 21
> OR
> > 22 OR 23, these are the Grand Rapids Department ID's. Can this be done?
> If
> > so what is the correct syntax?
> >
> > Label Value
> > Grand Rapids 21 OR 22 OR 23
> >
> >
> > WHERE (Acclaim.Staff.DepartmentID = @.DepartmentID)
> >
>
Showing posts with label selects. Show all posts
Showing posts with label selects. Show all posts
Friday, March 30, 2012
Report Parameter Selection aid fir user.
Hi,
Am curious, have a report paramater the user selects from a pull down
list that is smart enough to go to the record containing the first letter the
user types in. Is there any more intelligence we can add to this ? For
example expanding the record selection to perhaps two or three characters the
user types in.
Thanks, Steve.You can write your own custom toolbar using ASP.NET. However, you would
lose some interactive functionality like zoom.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"saustin99" <saustin99@.discussions.microsoft.com> wrote in message
news:BC425483-8FCB-4DD1-91FE-C1FF6535FC3F@.microsoft.com...
> Hi,
> Am curious, have a report paramater the user selects from a pull down
> list that is smart enough to go to the record containing the first letter
> the
> user types in. Is there any more intelligence we can add to this ? For
> example expanding the record selection to perhaps two or three characters
> the
> user types in.
> Thanks, Steve.|||Thanks for the reply Jeff ! Sounds like for this purpose it might be
overkill. Steve.
"Jeff A. Stucker" wrote:
> You can write your own custom toolbar using ASP.NET. However, you would
> lose some interactive functionality like zoom.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "saustin99" <saustin99@.discussions.microsoft.com> wrote in message
> news:BC425483-8FCB-4DD1-91FE-C1FF6535FC3F@.microsoft.com...
> > Hi,
> > Am curious, have a report paramater the user selects from a pull down
> > list that is smart enough to go to the record containing the first letter
> > the
> > user types in. Is there any more intelligence we can add to this ? For
> > example expanding the record selection to perhaps two or three characters
> > the
> > user types in.
> >
> > Thanks, Steve.
>
>
Am curious, have a report paramater the user selects from a pull down
list that is smart enough to go to the record containing the first letter the
user types in. Is there any more intelligence we can add to this ? For
example expanding the record selection to perhaps two or three characters the
user types in.
Thanks, Steve.You can write your own custom toolbar using ASP.NET. However, you would
lose some interactive functionality like zoom.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"saustin99" <saustin99@.discussions.microsoft.com> wrote in message
news:BC425483-8FCB-4DD1-91FE-C1FF6535FC3F@.microsoft.com...
> Hi,
> Am curious, have a report paramater the user selects from a pull down
> list that is smart enough to go to the record containing the first letter
> the
> user types in. Is there any more intelligence we can add to this ? For
> example expanding the record selection to perhaps two or three characters
> the
> user types in.
> Thanks, Steve.|||Thanks for the reply Jeff ! Sounds like for this purpose it might be
overkill. Steve.
"Jeff A. Stucker" wrote:
> You can write your own custom toolbar using ASP.NET. However, you would
> lose some interactive functionality like zoom.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "saustin99" <saustin99@.discussions.microsoft.com> wrote in message
> news:BC425483-8FCB-4DD1-91FE-C1FF6535FC3F@.microsoft.com...
> > Hi,
> > Am curious, have a report paramater the user selects from a pull down
> > list that is smart enough to go to the record containing the first letter
> > the
> > user types in. Is there any more intelligence we can add to this ? For
> > example expanding the record selection to perhaps two or three characters
> > the
> > user types in.
> >
> > Thanks, Steve.
>
>
Subscribe to:
Posts (Atom)