August 12, 2013 at 3:20 pm
Hi Folks,
I have a report and there are 2 parameters. Country and Sku. Country is drop down and sku is empty text box. I will select any country from drop down and i will type the SKU (for ex : CWF-01377) and then click view report.
Now the new requirement is, in SKU parameter, i need to mention 1 or more values (comma seperated) and then i need to get the report. (for ex : CWF-01377, CWF-01378, ...)
so i select one country.....type 2 or 3 SKU with comma seperated and then click view report.
Is anyone familiar with this kind of stuff.
Thanks,
SK
August 13, 2013 at 7:37 am
See if this helps: http://blog.summitcloud.com/2010/01/multivalue-parameters-with-stored-procedures-in-ssrs-sql/
HTH,
Rob
August 13, 2013 at 11:06 am
You can use Jeff Moden's 8K splitter (from this site) to create a table object containing the comma-separated values & then inner join this to the query to filter the results. - That's if you are using a stored procedure.
If the query code is written directly in the report you can just put the comma-separated parameter in an 'IN' stmt e.g.
where SKU IN (@SKU)
August 14, 2013 at 5:45 am
August 14, 2013 at 11:16 am
Thanks for the comments...
but my parameter is not a drop down....its a empty text box where i should enter year seperated by comma.
Ex : 2007, 2009, 2013...
August 14, 2013 at 2:10 pm
It doesn't make any difference - you would handle the resulting parameter in the same way.
August 21, 2013 at 1:52 pm
Hi
Did you try using the split() function ?
=split(Parameters!SKU.Value,",")
You can affect the result into another parameter or simply add it on the dataset (tab parameters)
It will return a table value you can use in a query with an In() :
... SKU in (@TableValuedSKU)
:w00t: !!!GOOGLE IS YOUR BEST FRIEND!!! :w00t:
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply