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
 Parameters in a ListBox...

Author  Topic 

GunZ
Starting Member

29 Posts

Posted - 2005-02-20 : 20:44:38
Hello ppls,

how do you implement a listbox (or the effect of a listbox) in RS where you can pick multiple items as parameters of the report?

Example:
    Products
  • Bananas
  • Oranges
  • Apples
  • Mangoes
  • Grapes
  • Others


So the dynamic query would look something like:

SELECT P.ProductDesc, S.Sales
FROM Product P
INNER JOIN Sales S on P.ProductID = S.ProductID
WHERE P.ProductID IN (3,27,88,89)


For reference, ProductID of
Banana = 2
Oranges = 3
Apples = 8
Mangoes = 1
Grapes = 88
Cheries = 89
etc


And the result would be the sales of each product of interest by the user.

Is this something MS left out for other third parties to supplement or is there a better way of doing things?


Australia.NSW.Sydney.GunZ

GunZ
Starting Member

29 Posts

Posted - 2005-02-23 : 18:48:36
Please?

Australia.NSW.Sydney.GunZ
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-02-23 : 18:50:05
I don't think you can in Reporting Services. It appears RS only allows one item to be selected at a time.

Tara
Go to Top of Page

GunZ
Starting Member

29 Posts

Posted - 2005-02-24 : 06:46:58
There's got to be a better way than forcing the user to select one up to ten items in ten drop down lists that will be part of the query

EXEC ('
select P.ProductDesc, S.Sales
from Product P
inner join Sales S on P.ProductID = S.ProductID
where P.ProductID IN ('+@CommaSeparatedValues+
')



Australia.NSW.Sydney.GunZ
Go to Top of Page
   

- Advertisement -