Multi value parameter is not working

Hello There,
I have been facing below issue and tried to find work around but no luck. Before I explain what issue is let me mention my report. I have a simple report developed in SQL 2K12 SP1 with one multiple value parameter and a text box. I have given an action on
text box where I am calling the same report by passing one of the possible value to multiple value parameter. Now issue is when I am trying to select another value(s) from multiple value parameter and click on view report it does not keeping the selected value
in parameter. It keeps on holding the same value which was passed on text box click action. Surprisingly this is working fine in SQL 2K8. Please let me know if need more information on the issue and let me know solution on this asap. I am not sure whether
this is bug in SQL 2K12.
Regards,
Bhushan

Hi Bhushan,
After testing the issue in my local SQL 2012 SP1 environment, I can reproduce it. And I also test the same scenario in my SQL 2008R2 environment, it works very well.
If you have any concern about this, please submit a feedback at
https://connect.microsoft.com/SQLServer/Feedback. Connect site is a connection point between you and Microsoft, and ultimately the larger community. Your feedback enables Microsoft to make software and services the best that they can be, and you can learn
about and contribute to exciting projects.
Thank you for your understanding.
Regards,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • Parameter gets reset and Multi-value parameter doesn't work

    Hi
    Two Issues:
    I've set the value of a Date parameter (Start Date) when moving from the home screen (Report 1) to the next screen (Report 2) as the first day of the current year (DateSerial(Year(Today),1,1). In report 2, if I try to change the Start Date to another date,
    it gets reset to the first day of the year. I had the default value set as the first day of the year and even after removing it, the Start Date gets reset.
    I've set a multi-value parameter (Area) in Report 1 that collects four integers. I pass Area to Report 2 (through Join (Parameters!Area.value,",")). I also used SPLIT (Join (Parameters!Area.value,","),",") to get the value.
    Then, in the data set, I call this parameter as "Select A1,A2,A3,B1,B2,B3 FROM TEST_VIEW WHERE ID IN (?)". But this query throws an error that the query could not be executed. I ran the same query on the server side and it runs fine.
    Note:
    We cannot reference parameter names as @area for example because the Composite Server doesn't allow that.
    Split and Join operate on strings but my parameters are of integer type. Is this an issue?
    Please help.

    1. Are setting an expression for available values of parameter in report 2? Is the value you pass a valid among the set of values?
    2. IN wont work with comma separated values. You need to parse the individual values out using a string parsing udf as a table and then join to that
    so in your case you would be like
    Select A1,A2,A3,B1,B2,B3 FROM TEST_VIEW t
    INNER JOIN dbo.ParseValues (@Area,',')f
    ON t.ID = f.Val
    ParseValues UDF can be found in below link
    http://visakhm.blogspot.in/2010/02/parsing-delimited-string.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Result Type Condition for Multi value Manage Property not working

    Hi All,
    I have created one template & I wanted to show this template on particular condition. So I created the result type. The Managed property (MP) that I used, I have verified its attributes all attributes are selected and its type is Multi value. I am trying
    to apply the "Show fewer conditions" and some how the value not matched.
    I have checked MP ; it has all the values but some how the template not called. When I removed this condition it working and when choose other MP other then Multi valued. It is working as expected.
     Please let me know if i miss something here. 
    PS: I have checked each option from the Query drop down like "Equals any of" and "Contains any of" not working in case of multi value attribute. Please help.
    I have explain this issue more details in this post : http://sharepointfordeveloper.blogspot.com/2015/02/sharepoint-search-2013-result-type-with.html
    Regards,
    Basant Pandey
    http://sharepointfordeveloper.blogspot.com

    Update on above mentioned issue.
    I have verified the same at my end. So I come to this conclusion this is product issue. Either need to raise the ticket to Microsoft related to this issue.
    Regards,
    Basant Pandey
    http://sharepointfordeveloper.blogspot.com

  • Multi value Cascading Parameters Not working

    Hi ,
    I have created two report parameters and want them as Cascading. District Parameter depends on Region Parameter which should allow Multi selection. When I select single value in Region it works perfectly. But when I choose multiple values, District turns
    out to be a blank text box. Can you please advise on how to fix this?
    I have used the In clause in my code
    SELECT
    DISTINCT
    SalesDistrict
    FROMDistrict(NOLOCK)
    WHERESalesRegion
    IN(@SalesRegion)
    SG

    that's because  "public sector,East" is passed as a string rather than multiple values.
    you should split them into multiple rows...  there are several functions that do that.. you can pass the string to the function and use  IN clause look them in the district table.
    below example is using xml but you can also use functions, if you want... just google  "split comma delimited string to multiple rows" function
    declare @District table (Distrcit int,Region varchar(20))
    Insert into @District values (1,'East'),(2,'West'),(3,'Public Sector')
    declare @xml xml, @s nvarchar(max)
    select @s = N'public sector,East'
    set @xml = N'<root><r>' + replace(@s,',','</r><r>') + '</r></root>'
    select * from @District where Region in
    (select t.value('.','varchar(max)') as [delimited items]
    from @xml.nodes('//root/r') as a(t))
    refer http://www.kodyaz.com/articles/t-sql-convert-split-delimeted-string-as-rows-using-xml.aspx
    Hope it Helps!!

  • Reporting Services Multi Value Parameter

    I have an SSRS 2005 report that I want to enable for multi value. However, I always run into the issue with the way it passes multiple values. How exactly do I get a multi-value parameter setup and working on both the report AND SQL side?
    I used the MS example of checking the multi checkbox for the parameter and then using a WHERE Column IN (@MultiParam), but this doesn't work. When you select one item, or is it multiple I can't remember, it fails. I really appreciate the help!
    Nathon Dalton
    Software Developer
    Systems Administrator
    Network Administrator
    Blog: http://nathondalton.wordpress.com

    Here's a sample of the SQL stored procedure that I use to get the dataset:
    Create
     proc [dbo].[spStoredProcName]
    @supervisor
    varchar(max) 
    as
    begin
    create
    table #tempSups
    Supervisor
    varchar(62)
    declare
    @i
    int
    select
    @i = 0
    select
    @i =
    charindex(',',@supervisor
    begin
    if @i
    <> 0
    while @i
    >0
    begin 
    insert
    into #tempSups
    values
    (ltrim(rtrim(left(@supervisor,
    @i-1))))
    select @supervisor
    =
    right(@supervisor,
    len(@supervisor)
    - @i)
    select @i
    =
    charindex(',',
    @supervisor)
    end
    end
    insert
    into #tempSups
    values
    (ltrim(rtrim(@supervisor)))
    From there, simply join your query to the temp table

  • Passing Multi-Value Parameter to a Stored Procedure

    Has anyone experienced passing a Parameter (MultiValue) to a Stored Procedure? I am aware that Crystal Passes the Param as an Array. How would you go about handling this within a Stored Procedure???

    Hi Daniel
    Try as below:
    1. Create a Crystal report, and add a multi-value parameter.
    2. Since the multi-value parameter is treated as an array, create a formula that uses the JOIN function. Create a formula as below:
    //Formula: @JoinFormula
    Join ({?Multi-value parameter array},";")
    ====================
    NOTE:
    In the formula above, a semi-colon (";") is the delimiter.
    ====================
    3. Within the main report, create a subreport based on the stored procedure, and include the parameter to be populated with the multi-value list.
    4. Link the Join formula in the main report to the stored procedure parameter in the subreport.
    Doing so passes a multi-value parameter to the stored procedure.
    Hope this helps!!!!
    Regards
    Sourashree

  • CASE Statement in Where Condition with Multi Valued parameter in SSRS

    Hi All,
    I am little confused while using CASE statement in Where condition in SSRS. Below is my scenario:
    SELECT
    Logic here
    WHERE
    Date IN (@Date)AND
    (CASE
    WHEN NAME LIKE 'ABC%' THEN 'GROUP1'
    WHEN ID IN ('123456', '823423','74233784') THEN 'GROUP2'
    WHEN ABC_ID IS NULL THEN 'GROUP3'
    ELSE 'GROUP4'
    END ) IN (@GROUP)
    So above query uses WHERE condition with CASE statement from @GROUP parameter. I want to pass this parameter as multi- valued parameter and hence I have used CASE statement IN (@GROUP).
    For @Date one dataset will pass the available and default values and
    for @GROUP parameters, another dataset will pass the available and default values.
    But this is not working as expected. Please suggest me where I am making mistake in the query.
    Maruthu | http://sharepoint-works.blogspot.com

    Hi Maruthu,
    According to your description, I create a sample report in my local environment. It works as I expected. In your scenario, if the selected values from the Date parameter contains some of the Date field values, the selected values from the GROUP parameter
    contains some of GROUPS (‘GROUP1’,’GROUP2’,’GROUP3’,’GROUP4’) and the corresponding when statement is executed , then the dataset returns the corresponding values.
    In order to trouble shoot this issue, could you tell us what results are you get and what’s your desired results? If possible, you can post the sample data with sample dataset, then we can make further analysis and help you out.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • 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 Name
    Created 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
    Starter
    Steve
    Steven
    Stevenson 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,

    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 Name
    Created 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
    Starter
    Steve
    Steven
    Stevenson 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

  • How to design SSRS report to filter multi-value parameter?

    I developed an RDL which takes a multivalue parameter and I want to set a visibility expression or filter based on this parameter. This parameter uses an "All" value equal to '660E4583-7F29-4D37-8038-5096AE6A1A7F'.
    I want to make the main tablix visible if this parameter is set to this uniqueidentifier and invisible otherwise. How can I achieve this either in the tsql dataset or on the report side? I have tried numerous workarounds, but none have worked so far! I've tried
    different expressions and datatypes.
    Before I tried If/Else statements in the tsql dataset, but most recently I instead added flags to the tsql dataset for each condition and am trying to make this tablix only include the records with the flag matching the parameters chosen. But even this is not
    working for me.
    Here is sample data:
    create table #dummydata
    parameter varchar(max),
    b varchar(max)
    insert #dummydata values('660E4583-7F29-4D37-8038-5096AE6A1A7F','record 1'),('660E4583-7F29-4D37-8038-5096AE6A1vcd','record 2'),('660E4583-7F29-4D37-8038-5096AE6A1v52','record 3')
    select * from #dummydata
    And my filter expression in the RDL for this tablix is:
    =iif(Parameters!Modifier.Value(0)="660E4583-7F29-4D37-8038-5096AE6A1A7F",1,0)
    With datatype = integer and value = 1 However, this tablix is invisible with the above even when I choose "All" for the parameter value = default value. How can I make this tablix visible?
    Ryan D

    Hi Ryan D,
    After testing the scenario in my local environment, everything goes well. As per my understanding, I think this issue can be caused by the Available values in the Modifier parameter. Could you tell us the Available values of Modifier parameter in your scenario?
    The following scenario in my test is for your reference:
    I create a dataset with the sample data you posted.
    Add a multi-value parameter named Modifier in the report.
    Specify the following values in the Available Values of the parameter (please note that the value “All” should be located in the first place, because we use Parameters!Modifier.Value(0) in the filter):
    Label: All                 Value: ="660E4583-7F29-4D37-8038-5096AE6A1A7F"
    Label: A                   Value: ="1"
    Label: B                   Value: ="2"
    Label: C                   Value: ="3"
    Drag a table to the design surface, insert parameter and b fields in the table.
    Use the same expression as you said to add a filter in the tablix.
    We can refer to the following screenshot:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Display Blank Tablix when using multi value parameter in SSRS 2008 R2

    I have a main report which contains tablix1 and tablix2. Tablix1 is using DataSet1 and Tablix2 is using DataSet2. I have a multi value parameter set up with 71 items to choose from. My company owns 71 convenience stores and what I am doing is comparing sales
    for a hard coded date in DataSet1 versus a hard coded date in DataSet2, sales for the same date 1 year ago. Pretty simple, works great when both datasets return data. However, we have a store that we opened up about 4 months ago. The data is displayed
    in Tablix1, but since the store did not exist 1 year ago, there is no data for Tablix2. I have tried the "No Row Message" and Repeating Column and Row Headers, etc. When I choose all stores that existed last year, the report runs great. When I choose
    a store that existed last year and our new store (#39) that did not, the report messes up. The below image, you can see Tablix1 is good, but Tablix2 should be blank and only show the column headers. Instead it moved Store #40's Tablix1 beside it. If I
    run the report and just select store #39, Tablix1 runs as it should and Tablix2 shows The column headers and a blank row. It disappears as soon as I select multiple values.
    When you click the next page button, you will see Store 40's Tablix2 where it's Tablix1 should be and then a blank space where Tablix2 should be.

    Hi BassMan75,
    According to your description, there is a main report with subreport, since the store did not exist one year ago, there is no data for the subreport. You want to show tablix grid even through there is no data in subreport, right?
    Report data comes from datasets, if there is no corresponding value in the dataset, only column headers will be displayed in the report, we could not set the rows to blank, so we can’t achieve your goal directly. As a workaround, we can put one text box
    in the report with the message: No data for the store. In this way, if there is no data meets search condition, the message will be displayed in the report. Please refer to the following steps:
    Click and select the tablix.
    In Properties window, in No Rows section, in NoRowsMessage text box, type No data for the store.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Passing multi value parameter to the Drill through report

    Hi
    I have two reports say Report A and Report B.
    Both reports using same parameters.
    I am Navigating from Report A to Report B using Jump to Report option.
    Now when I pass multiple parameter to the Report B it only displays first parameter results.
    In report B I have parameter multi value select to true.
    I would like to know if its possible or not to pass multi value parameter in drill through report?
    I would appreciate if someone can help me here.
    Regards
    Amit

    Yes you can pass multi value parameters to a drill through report.
    It works similar to multi value parameters for subreports, which is discussed in detail in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163803&SiteID=1
    -- Robert

  • Multi Value Parameter in URL

    I have a report(SSRS 2008) on top of a CUBE which have a subreport which needs to be opened in a new window, Passing the (MDX)parameters from URL, I have created a link which takes single value parameters and works fine, but when i tried to pass multi value MDX parameters it is not working can someone help me on this. Number is multivalue MDX parameter
    ="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no'" & ")"
    Thanks in Advance

    Hi Boyan, MDX is same between both the reports...my main report will show top 10 rows and when users wants to see more than ten rows he needs to click on the subreport link.
    I found a way to pass multivalue parameter but the problem is i am passing a MDX parameter which will have & ([Division].[Division Name].&[USA]) before the value...so in the java script while passing the parameter value it is taking &value(&[USA]) as new parameter and throws a error message saying &USA not found.
    ="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Division="& Parameters!Division.Value &"&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no,Location=yes'" & ")"
    Here in the below link Division is a multi value parameter, after doing some research i found %2526% will replace &, but the problem is when passing the second parameter it is replacing &Division with %2526Division and asking me to enter division manually if i have selected more than one value.
    ="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Division="& replace(Join(Parameters!Division.Value,"&Division="), "&", "%2526") &"&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no,Location=yes'" & ")"
    Thanks.

  • Multi value parameter sniffing

    DECLARE
    @w1_p int,
    @w2_p int,
    @month_p int,
    @usdTHISweek_p float,
    @usdLASTweek_p float,
    @MASS_KIB_p nvarchar(max),
    @branch_eq_ccode_p nvarchar(max)
    set @w1_p=@w1
    set @w2_p=@w2
    set @month_p=@month
    set @usdTHISweek_p=@usdTHISweek
    set @usdLASTweek_p=@usdLASTweek
    set @MASS_KIB_p=@MASS_KIB
    set @branch_eq_ccode_p=@branch_eq_ccode
    select a.* from
    (SELECT
    case when cat.NAME='MASS' then 'MASS' else 'КИБ' end as mass_kib,
    cb.NAME_GEN as oper_typeGEN,
    cb.NAME as oper_type,
    case when br.name is null then 'не определен' else br.name end as BRANCH_EQ_CCODE,
    case when cat.NAME is null then 'Прочие' else cat.NAME end as 'segm',
    t.END_PRD_ID,
    sum(case when END_PRD_ID=@w1_p then t.FACT_WEEK else 0 end) as 'w1',
    sum(case when END_PRD_ID=@w2_p then t.FACT_WEEK else 0 end) as 'w2',
    sum(case when END_PRD_ID=@w1_p then t.FACT_MONTH else 0 end) as 'this week_month',
    sum(case when END_PRD_ID=@w1_p then t.PLAN_MONTH else 0 end) as 'plan_month',
    null as 'month_fact',null as 'month_plan',null as 'month_endprdid',
    sum(case when END_PRD_ID=@w1_p then t.FACT_YEAR else 0 end) as 'fact_year',
    sum(case when END_PRD_ID=@w1_p then t.PLAN_YEAR else 0 end) as 'plan_year'
    FROM [ODS_REPLICA].[stg].[CBClient_week] t
    inner join (select * from hnd.OLI_CBMEASID where RB_flag=1) cb on t.CB_MEAS_ID=cb.CB_MEAS_ID and t.BUSINESSTYPE_UK=cb.BUSINESSTYPE_UK
    left join stg.client cl on t.CLT_PIN_CD=cl.k_client and t.EN_BRANCH_ID=cl.branch_id
    left join hnd.OLI_BRANCH br on t.BRANCH_EQ_CCODE=br.BRANCH_EQ_CCODE
    left join hnd.OLI_CAT cat on cl.CAT=cat.CAT
    where END_PRD_ID=@w1_p and end_prd_id=@w2_p
    group by t.END_PRD_ID,cb.NAME,cb.NAME_GEN,cat.NAME,br.name
    union all
    SELECT
    case when cat.NAME='MASS' then 'MASS' else 'КИБ' end as mass_kib,
    cb.NAME_GEN as oper_typeGEN,
    cb.NAME as oper_type,
    case when br.name is null then 'не определен' else br.name end as BRANCH_EQ_CCODE,
    case when cat.NAME is null then 'Прочие' else cat.NAME end as 'segm',
    null,
    null,null,null,null,
    sum(t.FACT_MONTH),
    sum(t.PLAN_MONTH),
    t.END_PRD_ID,null,null
    FROM [ODS_REPLICA].[stg].CBClient_month_since2012 t
    inner join (select * from hnd.OLI_CBMEASID where RB_flag=1) cb on t.CB_MEAS_ID=cb.CB_MEAS_ID and t.BUSINESSTYPE_UK=cb.BUSINESSTYPE_UK
    left join stg.client cl on t.CLT_PIN_CD=cl.k_client and t.EN_BRANCH_ID=cl.branch_id
    left join hnd.OLI_CAT cat on cl.CAT=cat.CAT
    left join hnd.OLI_BRANCH br on t.BRANCH_EQ_CCODE=br.BRANCH_EQ_CCODE
    where END_PRD_ID=@month_p
    group by t.END_PRD_ID,cb.NAME,cb.NAME_GEN,cat.NAME,br.NAME
    )a
    where a.branch_eq_ccode in (@branch_eq_ccode_p) and a.MASS_KIB in(@MASS_KIB_p)
    Hi! I`m having great trouble sniffing multi-value parameter.
    The problem is that the query runs in SSMS about 5 seconds and in SSRS about 1 minute.
    My multi valued parameters are below. I added fx (="'" + JOIN(Parameters!MASS_KIB.Value, "','") + "'") in the parameters options for the dataset, but the results of the query are blank.
    I feel like i`m wrong with all the sp_exec and N'....stuff. 
    Please help me with that.
    Oleg
    @branch_eq_ccode_p,@MASS_KIB_p

    As I understand the filter condition is not correct.
    you need to make it as below for multi parameter to work correctly
    CREATE TABLE #branchcodes
    BranchCode varchar(50)
    INSERT #branchcodes
    SELECT Val
    FROM dbo.ParseValues(@branch_eq_ccode_p,',')
    CREATE TABLE #MASSKIBs
    MASSKIB varchar(50)
    INSERT #MASSKIBs
    SELECT Val
    FROM dbo.ParseValues(@MASS_KIB_p,',')
    SELECT ...
    FROM ..
    INNER JOIN #branchcodes bc
    ON bc.BranchCode = ac.branch_eq_ccode
    INNER JOIN #MASSKIBs mk
    ON mk.MASSKIB = a.MASS_KIB
    Also see ParseValues here
    http://visakhm.blogspot.in/2010/02/parsing-delimited-string.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Use one value of multi value parameter in dataset query

    I have a parameter @Period that is populated with posting periods from our financial system (e.g. 201301, 201302, 201303, etc.).  It is set as a multi value parameter to allow users to choose multiple posting periods.  This parameter
    is used in my main dataset.  If the user chooses 201301 and 201302, I want to choose the greatest value chosen and use it in a where clause such that MyPostPeriod <= @Period.  Since @Period is a multivalue, the ><= won't work. 
    I read that SSRS just passes this as a comma separated value (201301,201302).  How do I find the greatest value in the list and how do I use that in my where clause?
    the user is selecting projects with activity during the posting period but then I want to grab all costs and invoices since the project was created.  They choose to see activity in 201301 and 201302 but I need to get all invoices and costs <= 201302.
    The only option I have been able to come up with is to have two parameters - one for start period and one for end period. Any better solutions?  I'm not using stored procedures.
    Milissa Hartwell

    Hi Milissa,
    Based on your description, you want to get the Maximum value from a multi-value parameter. We can insert the selected values into a temp table and get the Maximum values. Suppose we have main dataset (DataSet1) include Period field, and a parameter Period
    in the report. Please refer to the following steps:
    Create another dataset named DataSet2 using the query below.
    CREATE TABLE #Max (COL1 INT)
    INSERT INTO #Max Values(1)
    SELECT * FROM #Max
    Double click DataSet2, change the dataset using the expression below:
    ="CREATE TABLE #Max (COL1 INT)" &
    "INSERT INTO #Max VALUES (" & Join(Parameters! Period.Value,"),(") &")" &
    "SELECT TOP 1 * FROM #Max ORDER BY COL1 DESC"
    Create a parameter (Max) set the Data Type to “Integer”, and get the available values and default values from the DataSet2 COL1. Then, set the visibility to “Hidden”.
    Double click the DataSet1, click Filters in the left pane. Fill with following values:
    Expression: [Period]
    Operator: <=
    Value: [@Max]
    Please refer to the following screenshot:
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Passing value to multi value parameter from SSIS using Report server webservice

    Hi
    I am triggering SSRS report from SSIS(Script task). I am passing parameter values from SSIS package.
    So far working fine. Now, I have a report which has 2 parameters. One is single value parameter and the other is multi value parameter.
    No issue assigning value to single value parameter. But how can I pass multi value to multi value parameter?
    My code as below
    ReportExecutionService rs = new ReportExecutionService()
    rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
    rs.Url = _webserviceURL;
    rs.LoadReport(_reportPath, null);
    ParameterValue[] paramval = new ParameterValue[2];
                            paramval[0] = new ParameterValue();
                            paramval[0].Name = "CountryCode";
                            paramval[0].Value = _countryNames;
                            **paramval[1] = new ParameterValue();
                            paramval[1].Name = "BusinessCode";
                            paramval[1].Value = _businessCode;****
                            rs.SetExecutionParameters(paramval, "en-us");
    I am not sure how to pass value to BusinessCode(Multi value parameter)

    Hi Rajkm,
    In order to pass a multi-value parameter through the Reporting Services Web services, you need to define the same numbers of ParameterValue objects as the number of the values of the multi-value parameter being past into the report. The Name property
    of these ParameterValue objects must be specified same to the parameter name.
    I found a good FAQ article for this scenario:
    How do I pass a multi-value parameter into a report with Reporting Services Web service API?:
    http://blogs.msdn.com/b/sqlforum/archive/2010/12/21/faq-how-do-i-pass-a-multi-value-parameter-into-a-report-with-sql-server-reporting-services-ssrs-web-services-api.aspx
    Hope this helps.
    Elvis Long
    TechNet Community Support

Maybe you are looking for

  • How can I copy a pdf into Pages

    I often get documents emailed to me in pdf format that I want to edit.  On my Mac I can select text in the pdf and copy/paste into Word to make it an editable document.  On my iPad I have Pages.  Does anyone know of an app (preferable free or low cos

  • Error while opening the ORACLE application

    hi when i am opening the Oracle application(DB & oracle forms) -frm-40815 message is coming and when i say enter and it is asking me database details. I checked the oracle services and they are in started state and server path is also pinging but i a

  • Help! I did something retardedly

    Basically i bought a bb torch off a person on gumtree... and it was fully working except it was assigned to his bb id... i thought like a dumbo forget it and its been working for the full two weeks until now... i swapped my vodafone sim for a t mobil

  • Server app can't connect to AirPort Extreme

    I just got a Mac Mini, 2010 and did the upgrade to Mountain lion and then included Mountain lion server. Before I going to further I need to preface by saying that server administration is something new for me so be kind please! Long story short ever

  • ITunes interference with other applications

    Everytime I go to play a game or open one of several applications (games), my songs on iTunes "skip" like an old scratched record. When I close the game/application, the song or track plays normal with no problems. I'm befuzZled...... Any help????