I have a simple store procedure and I'm pulling the results into CR. It works great but I need to be able to allow the user to select multiple product numbers, if they want to. Sometimes they need sales for 1 product number, sometimes that have 10 or 12 products they need sales on. Right now they can only select one product at a time. How can I make it take 1 product or multiple products? thanks for the help...
CREATE PROCEDURE SQLUSER.ProductSales
SELECT dbo.TicketDetail.ProductNo AS Number, SUM(dbo.TicketDetail.Dollars) AS Dollar, SUM(dbo.TicketDetail.Units) AS Unit,
FROM dbo.TicketDetail INNER JOIN dbo.Products ON dbo.TicketDetail.LocationId = dbo.Products.LocationId AND dbo.TicketDetail.ProductNo = dbo.Products.ProductNo
WHERE (dbo.TicketDetail.ProductNo =@ProductNo) AND (dbo.TicketDetail.TicketDate BETWEEN @StartDate and @EndDate)
GROUP BY dbo.TicketDetail.ProductNo, dbo.Products.Description
ORDER BY dbo.TicketDetail.ProductNo