sql server reporting services:
Hey all,
I have a sql query dataset that uses parameters derived from 2 previous sql
query datasets:
SELECT MachineID,
ModelNumber,
ProductName
FROM Admin.dbo.PricingMachine
WHERE MachineType IN (@GroupType)
AND CurrentProduct IN (@Status)
I have the parameters for this dataset defined as
@GroupType =JOIN(Parameters!GroupType.Value,",")
@Status =JOIN(Parameters!Status.Value,",")
Here are the 2 other queries that create the parameters:
For @Status:
SELECT Distinct CurrentProduct AS Status, Description = CASE CurrentProduct
WHEN 'Y' THEN 'Current'
WHEN 'N' THEN 'Discontinued'
WHEN 'X' THEN 'NonSellable'
END
FROM Admin.dbo.PricingMachine
ORDER BY Description
For @GroupType:
SELECT DISTINCT MachineType, Description = CASE MachineType WHEN 'C' THEN
'Analog Copiers'
WHEN 'E' THEN 'Engineering'
WHEN 'CO' THEN 'Full Color Copiers'
WHEN 'M' THEN 'Multifunction Copiers'
WHEN 'PC' THEN 'Printers - Color'
WHEN 'P' THEN 'Printers - B&W'
WHEN 'EP' THEN 'Priports' END
FROM Admin.dbo.PricingMachine
WHERE MachineType IN ('C','E','CO','M','PC','P','EP')
ORDER BY MachineType
If only one grouptype is selected it works fine, even with multiple statuses
selected (which correctly pulls in all data for all selected statuses, no
problem). If I select multiple grouptypes (regardless of # of status
selected) the resulting dataset is empty. Any ideas?
Thanks for any and all help!