SSRS : Reporting Services - Multi-Value Parameter Issue
Hi,This problem is been around the blogs and forums for while now but may be it's not answered to the fullest. I couldn't get any satisfactory or completed solution on the issue so far, any clues/help will be highly appreciated.My scenario is very simple :- I am using SQL Server 2005 and SSRS. I need to develop a report which has a parameter value called Customer Name. The users should be able to select multiple customers from the list and sometimes Select All also. I tried the following :- Created two data sets : Second dataset is just to populate the Customer NameCreated a Report Parameter and mapped with the query parameter where it says "Where CName in (@Parameter1)"Nothing seems to be working although I tried to apply all the existing half-way solutions currently available in the forums. May be I am not getting to the right solution.Here is what's happening :-When used '?' like "where CName = ?" then it's working fine for the single value. {Multi value query cannot be used with ?}But for multiple values when used @Parameter1 like "where CName in (@Parameter1)" it's giving the following error Cannot add multi value query parameter '@Parameter1' for data set 'Dataset1' because it is not supported by the data extension. However if commented this line it's pulling all the values whether or not selected from the parameter list.This is the basic thing which I was not able to get the desired result, in addition I was looking to get the Customer Name parameter selected with a partial entry as we use LIKE. Example :- If the user enters 'St' in the text box the list should show all the names starting from those two letters StarterSteveStevenStevenson etc. I am not sure whether I'll will be able to get to this extent or not but until the multi value parameter, I am desperate to get the solution. So any sort of help/advise is highly appreciated.Regards,
January 12th, 2010 11:13pm

Hi,This problem is been around the blogs and forums for while now but may be it's not answered to the fullest. I couldn't get any satisfactory or completed solution on the issue so far, any clues/help will be highly appreciated.My scenario is very simple :- I am using SQL Server 2005 and SSRS. I need to develop a report which has a parameter value called Customer Name. The users should be able to select multiple customers from the list and sometimes Select All also. I tried the following :- Created two data sets : Second dataset is just to populate the Customer NameCreated a Report Parameter and mapped with the query parameter where it says "Where CName in (@Parameter1)"Nothing seems to be working although I tried to apply all the existing half-way solutions currently available in the forums. May be I am not getting to the right solution.Here is what's happening :-When used '?' like "where CName = ?" then it's working fine for the single value. {Multi value query cannot be used with ?}But for multiple values when used @Parameter1 like "where CName in (@Parameter1)" it's giving the following error Cannot add multi value query parameter '@Parameter1' for data set 'Dataset1' because it is not supported by the data extension. However if commented this line it's pulling all the values whether or not selected from the parameter list.This is the basic thing which I was not able to get the desired result, in addition I was looking to get the Customer Name parameter selected with a partial entry as we use LIKE. Example :- If the user enters 'St' in the text box the list should show all the names starting from those two letters StarterSteveStevenStevenson etc. I am not sure whether I'll will be able to get to this extent or not but until the multi value parameter, I am desperate to get the solution. So any sort of help/advise is highly appreciated.Regards, you speak spanish
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2010 11:37pm

you speak speak spanish?
January 12th, 2010 11:38pm

http://msdn.microsoft.com/es-es/library/aa337426(SQL.90).aspx
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2010 11:41pm

Hi Minhaj008,For multiple values parameter issue, I would suggest you using combination query string like this:="SELECT Alias, Question From [EngineerSC$] WHERE Alias IN ('" + Join(Parameters!Parameter1.Value, "','") + "')"We can also use "Like" like this:="SELECT Alias, Question From [EngineerSC$] WHERE Alias Like('" + Parameters!Parameter2.Value + "')"By the way, please remove all parameters from "Parameter" property tab of a DataSet, or we will get the error "Cannot add multi value query parameter '@Parameter1' for data set 'Dataset1' because it is not supported by the data extension."If there is anything unclear, please feel free to ask.Thanks,Jin ChenJin Chen - MSFT
January 14th, 2010 11:57am

Hi Jin,Thanks for your response, sorry for delayed comeback as I went for a couple weeks vacation.I tried your suggestion with above string but it is not returning any data . . . just blank . . . Do i have to use the whole statement as it is from SELECT . . . or just the one select on top is enough ? Like my dataset query goes . . . SELECT a, b, c, CName FROM Table1Where CName IN ('"+Join(Parameters!Parameter1.Value, "','") + "')Besides I have created a Report Parameter (Parameter1), do I have to declare a query parameter as well for the dataset ??Thanks in advance
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2010 6:26pm

Thanks Zabdiel29I don't speak spanish, but I could manage to find the link in English you sent above. "Adding Cascading Parameters to a Report". This one is little different than my scenario, mine is quite simple and is not using Cascading instead it is using only one Parameter with multiple values to chose from where the whole issue is lying as it pulls up all the rows even only 1 or 2 are selected from the parameter values list.Thanks for your help.<!----><!--Content type: DocStudio. Transform: devdiv2mtps.xslt.-->
January 27th, 2010 10:22pm

Hi Minhaj008,The query should be:="SELECT a, b, c, CName FROM Table1Where CName IN ('"+Join(Parameters!Parameter1.Value, "','") + "')"With the "=", the First" " ", and then last " " ".Thanks,Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2010 2:08pm

Hi Minhaj008, The query should be: ="SELECT a, b, c, CName FROM Table1 Where CName IN ('"+Join(Parameters!Parameter1.Value, "','") + "')" With the "=", the First" " ", and then last " " ". Thanks, Jin Chen Jin Chen - MSFT I am also facing the same problem i.e. when I am using the JOIN function it returns no data. Now where do I use the"=", the First" " ", and then last " " " ?? I have entered the query in generic query designer with the CommandType as Text. Thanks Kamlesh SV
June 25th, 2010 9:44pm

I am facing an issue while passing multivalued parameters when the data source used in oracle. I did go through some of the discussed above but didn't find it much helpful. A simple example: In my report the result set depends on two valued parameter. I used select -------- from ------- where area in :area In report designing when i select parameter property as 'allow multivalued property' it gives me following error: Cannot add multivalue query parameter 'area' for dataset1 because it is not supported by the data extension. Report works perfectly fine when i un select the multivalue option in parameter property and just select one value at a time. Thanks J S
Free Windows Admin Tool Kit Click here and download it now
October 7th, 2010 11:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics