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.
Author |
Topic |
pmak
Starting Member
41 Posts |
Posted - 2006-05-10 : 01:57:08
|
I am using 2005 SQL Reporting Services. I have a combo box with multi-valued parameters enabled on one of the report. The parameters is based on a query and the value of it is a "string" datatype and it will pass to a store procedure to retrieve a recordset for the report. I use the "IN" to accomondate multi-valued parameters. However I can get the store procedure work with more than a single parameter.My store procedureset ANSI_NULLS OFFset QUOTED_IDENTIFIER OFFGOALTER PROCEDURE [dbo].[rpt_Inventory_By_Location]@Location nvarchar(255)ASSELECT Tbl_Product.Product, Tbl_Inventory.StockNumber, Tbl_Inventory.PotSize, Tbl_Inventory_Detail.Location, SUM(Tbl_Inventory_Detail.Quantity) AS SumOfQuantity, Tbl_Inventory_Detail.UnitPrice, Tbl_Inventory_Detail.Status, Tbl_Inventory_Detail.UserNotes, Tbl_Inventory_Detail.StockNumberNotes FROM Tbl_Product INNER JOIN Tbl_Inventory ON Tbl_Product.ProductID = Tbl_Inventory.ProductID INNER JOIN Tbl_Inventory_Detail ON Tbl_Inventory.InventoryID = Tbl_Inventory_Detail.InventoryID GROUP BY Tbl_Product.Product, Tbl_Inventory.StockNumber, Tbl_Inventory.PotSize, Tbl_Inventory_Detail.Location, Tbl_Inventory_Detail.UnitPrice, Tbl_Inventory_Detail.Status, Tbl_Inventory_Detail.UserNotes, Tbl_Inventory_Detail.StockNumberNotes HAVING (Tbl_Inventory_Detail.Location IN (@Location)) ORDER By Tbl_Product.Product |
|
Hommer
Aged Yak Warrior
808 Posts |
Posted - 2006-05-10 : 14:41:34
|
Make sure that string is single quoted and comma delimited, like 'Loc123','Loc234', because that is the IN should look like. |
 |
|
mmarovic
Aged Yak Warrior
518 Posts |
|
|
|
|
|
|