• Hi everyone,
    I have a problem passing a multivalue parameter to a subreport. I have
    a main report that has a chart and a table. I set one of the datafields
    (a chart's column) on the chart to be clickable to jump to a subreport.
    I pass two parameters. One of them is a multivalue parameter. It is
    called 'Name.' I right-clicked the datafield -> properties -> action ->
    jump to report. I selected my report, then clicked parameters, chose my
    parameter name. For parameter value I went to expression -> parameters,
    chose my parameter - Name and this is what is being assigned by


    I understand it is using an array and only the first value is picked
    up. How do I pass more than just first value? My parameter in subreport
    is set to multivalue. That does not do the job automatically. The
    second parameter is passed fine since it is only one value for each

    Any help will be appreciated!


    Thursday, April 06, 2006 3:24 PM


All replies

  • I found an expression to convert an array to a comma delimeted list of values:

    =Join(Parameters!Name.Value, ", ")

    But if I select more than one value in my main report I get no data in subreport. The values are displayed correctly in the parameter window like -- 2, 5. If I select multivalue in subreport's parameter peoperties of my subreport and select more than one value in main report, I get nothing again. If I click on the drop-down of multi-select and type each individual values in its own line I get data back! By the way, by selecting only one value I can get data in my subreport. What I can do to use multi-values?


    Thursday, April 06, 2006 3:44 PM
  • If the subreport parameter is also marked as multi/value parameter, then just use the following expression:


    See also this related thread which discusses various scenarios in more detail:

    -- Robert

    Friday, April 07, 2006 5:35 PM
  • Hi Robert,

    If use use =Parameters!Name.Value you will only pass first value in the parameter because RS uses arrays. If you try =Parameters!Name.Value, the RS changes it to =Parameters!Name.Value(0) since the parameter is multivalue.

    I have a different problem now. I managed to pass the parameters to a sureport. I use Join function
    =Join(Parameters!MarketingVehicleID.Value, vbcrlf)

    The newline character is for the multivalue drop down.

    I click on the column and see my subreport with all the parameters
    passed. They are seen in dropdowns but the data is not there. If I
    click "View Report" my data shows up. In other words, parameters are
    being passed but the subreport requires refresh. I can not explain this
    behavior. Any ideas?


    Friday, April 07, 2006 7:45 PM
  • Robert,

    You are right! I just found a problem. By default RS places multivale paramater as:


    I removed the (0)! It  works!


    Friday, April 07, 2006 8:16 PM