larrydavid
Programmer
Hello,
I am passing a multi-valued parameter into a dataset from a TypeBusiness dropdown list:
=join(Parameters!prmTypeBusiness.Value,",")
Here is the dataset query behind the TypeBusiness dropdown parameter list:
SELECT type_bus_code, bus_desc
FROM business
WHERE (type_bus_code IS NOT NULL)
Here is the WHERE clause from the main dataset query (dsMainData) which gets the parameter values:
WHERE WEKAVG.BUSINESS_CODE IN(@prmTypeBusiness)
Here is the error I get when selecting values from the TypeBusiness dropdown list then previewing the report:
"Cannot read the next data row for the dataset dsMainData.
Conversion failed when converting the nvarchar value '1,2' to data type smallint."
The value is a small int coming from the dataset query behind the TypeBusiness dropdown list, and the data type in the column expecting this value (in the main dataset query) is also a small int.
I have tried many things, including a replace in the =join(Parameters!prmTypeBusiness.Value,","), a replace in the WHERE clause, a Split function, CAST to varchar, have researched this online and cannot solve this error.
If someone could please help me save what little gray hairs I have left I would greatly appreciate any help, suggestion or point in the right direction.
Thanks,
Larry
I am passing a multi-valued parameter into a dataset from a TypeBusiness dropdown list:
=join(Parameters!prmTypeBusiness.Value,",")
Here is the dataset query behind the TypeBusiness dropdown parameter list:
SELECT type_bus_code, bus_desc
FROM business
WHERE (type_bus_code IS NOT NULL)
Here is the WHERE clause from the main dataset query (dsMainData) which gets the parameter values:
WHERE WEKAVG.BUSINESS_CODE IN(@prmTypeBusiness)
Here is the error I get when selecting values from the TypeBusiness dropdown list then previewing the report:
"Cannot read the next data row for the dataset dsMainData.
Conversion failed when converting the nvarchar value '1,2' to data type smallint."
The value is a small int coming from the dataset query behind the TypeBusiness dropdown list, and the data type in the column expecting this value (in the main dataset query) is also a small int.
I have tried many things, including a replace in the =join(Parameters!prmTypeBusiness.Value,","), a replace in the WHERE clause, a Split function, CAST to varchar, have researched this online and cannot solve this error.
If someone could please help me save what little gray hairs I have left I would greatly appreciate any help, suggestion or point in the right direction.
Thanks,
Larry