Passing Parameters in SSRS

  • I am trying to pass a parameter from one report to another. I will be passing a YYYYMM from one report to another. In the first report, you choose your 'beginPeriod', in the format YYYYMM and view report. In the report is a link to a second report. In the second report, there is also a beginPeriod. When the 2nd report is accessed, it should automatically run using the passed YYYYMM. AND there should be a parameter window with the YYYYMM filled in, but you should have the option to change it and run again.

    The gotoURL link looks like this: ="http://xxxxxxxxxx/Pages/Report.aspx?ItemPath=%2xxxxxxxxxx%2ftest2&ViewMode=Detail&rc:Parameters=True&beginPeriod=" & Parameters!beginPeriod.Value

    When you click the link, the URL in the address bar is

    http://xxxxxxxxxxxx/Pages/Report.aspx?ItemPath=%2fxxxxxxxxxxxxxxx%2ftest2&ViewMode=Detail&rc:Parameters=True&beginPeriod=201001

    So the parameter is passing correct.

    But the 2nd report is not running, because the beginPeriod parameter in report 2 just shows like the 2nd attachment.

    The passed value is definitely one of the available values in the dropdown on the 2nd report. Is there a way to get the 2nd report to default to the passed value and execute?

  • Why are you using goto URL? Simply use the in-built feature to navigate to another report and use "Go To Report" as the action. You don't need to code your own URL then, SSRS does it all for you.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Because I need the parameters pane to be open on the 2nd report. If I use the action 'Go To Report', it closes the parameter pane if all the parameters are satisfied, but with the Go To URL, I think I can force it open with '&rc:Parameters=True'

  • If the URL is correct, this implies that the value you have supplied in not valid. I can see in your second screenshot that the parameter is a drop down. If the value you pass is not in your options, SSRS will effectively ignore it, amnd ask you for the parameter again

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • As noted in the original post, The passed value is definitely one of the available values in the dropdown on the 2nd report.

  • What is the actual name of the parameter in the report? Is it "beginValue"? I ask, as SSRS parameters are case sensitive. If the parameter name is "beginvalue", "BeginValue", "Beginvalue", etc, it also won't work as you were referencing "beginValue".

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • it is beginPeriod everywhere.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply