report parameters

Last Post 14 Dec 2010 04:12 AM by dbandee. 0 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages Not Resolved
dbandee
New Member
New Member

--
14 Dec 2010 04:12 AM
Good morning There is one thing with sql reports i dont quite understand. I have simple report and two input parameters dependant on each other. So if i pick a State i get list of counties for that state. It works fine. I have combo box so i can pik CA, MA, VT and second dropdown is populted by sproc that takes the list of states and returns counties. It is a sproc beause it does some complex filetring and joins based on sales. So when i open the report and i select NY, NJ, MA for example in profile the following gets passed: exec usp_CountiesByStateSales @States = N'NY,NJ,MA' When i change sproc to a function (because i want to union the output with something else) parameters are passes differently and code breaks: udf_CountiesByStateSales @Classes = @States = N'NY',N'NJ',N'MA' I dont understand why it passes values as separate strings when i use funtion, when i use sproc the values are passes as one string. Can someone explain. Thanks


Acceptable Use Policy
---