locked
Trouble passing through multi value default parameter to subreport RRS feed

  • Question

  • I have a summary report that is linked to a subreport that will pass through a series of parameters to get a detailed report. One of the parameters has default value of a string of 5 words. I would like to pass through all 5 of these words into the subreport, but when I try all I get is the first value. Any one know how to get ALL 5 to pass through?
    Monday, March 30, 2009 4:19 PM

Answers

  • Hi,

     

    You should test the subreport stand alone and make sure it works. As I know, there are three methods to pass a multi value with default value.

     

    Solution1: Using split function for the default values. Suppose you want to pass “A”, “B” and “C” to the report, you can set the default value to be: =split("A,B,C", ",")

     

    Solution2: select the null-query for the default values, and then set the default values directly like this:

    =”A”

    =”B”

    =”C”

     

    Solution3: create a new dataset for the default values, and then set the default values base on the new dataset.

     

    After that, if the subreport works, drag the report to the main repot. If the main report have a multi value parameter say parameter1, and you want to pass the parameter1 to the subreport. In this case the mapping is just a simple parameter expression: =Parameters! parameter1.Value. Don’t use parameter array like this:=Parameters!par1.Value(0)

     

    For other Scenarios, here is a similar thread about passing multi value with default vaules:

    http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/ae5ac615-1076-428d-9fcf-6c27e5fee1f0/

     

    Please let me know if this helps.

    Raymond

    • Proposed as answer by Raymond-Lee Wednesday, April 8, 2009 5:39 AM
    • Marked as answer by Raymond-Lee Thursday, April 9, 2009 10:37 AM
    Wednesday, April 1, 2009 7:47 AM

All replies

  • Create a new report parameter say XYZ. Assign XYZ default value to = String of five word.
    Then use this parameter XYZ when you try to match the report Paramter from Summary to Detail.
    ~~ Mark it as Answer if you find it correct~~
    Monday, March 30, 2009 4:26 PM
  • Hi,

     

    You should test the subreport stand alone and make sure it works. As I know, there are three methods to pass a multi value with default value.

     

    Solution1: Using split function for the default values. Suppose you want to pass “A”, “B” and “C” to the report, you can set the default value to be: =split("A,B,C", ",")

     

    Solution2: select the null-query for the default values, and then set the default values directly like this:

    =”A”

    =”B”

    =”C”

     

    Solution3: create a new dataset for the default values, and then set the default values base on the new dataset.

     

    After that, if the subreport works, drag the report to the main repot. If the main report have a multi value parameter say parameter1, and you want to pass the parameter1 to the subreport. In this case the mapping is just a simple parameter expression: =Parameters! parameter1.Value. Don’t use parameter array like this:=Parameters!par1.Value(0)

     

    For other Scenarios, here is a similar thread about passing multi value with default vaules:

    http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/ae5ac615-1076-428d-9fcf-6c27e5fee1f0/

     

    Please let me know if this helps.

    Raymond

    • Proposed as answer by Raymond-Lee Wednesday, April 8, 2009 5:39 AM
    • Marked as answer by Raymond-Lee Thursday, April 9, 2009 10:37 AM
    Wednesday, April 1, 2009 7:47 AM