SSRS - VS2013 - Parameter Refresh Issue with optional Parameters

  • I have a report that needs an option to search for either a Date Range or a Payment Number.  To do this I have created a parameter that returns a value of 1 (date range) or 2 (payment no).  This parameter is then used to define whether the
    Date parameter defaults to NULL or the Payment No defaults to NULL.    For the date parameter, a default date populates when it is chosen.

    This works perfectly fine when I first open the report, but if I change the option, the parameters don't refresh.  I have selected Always Refresh for each of my parameters but that doesn't make a difference.  Does anyone have any other idea's?

    I have attached an example of each option.

  • That behavior depends on exactly how you go about it.  Since both of the dependent parameters are capable of being null, there's no good reason for the report to refresh the parameters.   Exactly where and how are you setting the default value for each of the parameters?

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • carolyn.foster - Thursday, June 22, 2017 10:00 AM

    I have a report that needs an option to search for either a Date Range or a Payment Number.  To do this I have created a parameter that returns a value of 1 (date range) or 2 (payment no).  This parameter is then used to define whether the
    Date parameter defaults to NULL or the Payment No defaults to NULL.    For the date parameter, a default date populates when it is chosen.

    This works perfectly fine when I first open the report, but if I change the option, the parameters don't refresh.  I have selected Always Refresh for each of my parameters but that doesn't make a difference.  Does anyone have any other idea's?

    I have attached an example of each option.

    It sounds like you could be hitting this issue - read through it and see what you think:
    Default does not get refreshed for cascading parameters

    Sue

  • Yes that's the issue.  I've tried different ways of getting the data for my parameters to no avail.

  • carolyn.foster - Wednesday, July 5, 2017 10:26 AM

    Yes that's the issue.  I've tried different ways of getting the data for my parameters to no avail.

    That's what I thought.
    On the first parameter, depending on what they pick, set the second set of parameters instead of depending on the refresh of the parameters. So a manual refresh basically.

    Sue

  • Sue_H - Wednesday, July 5, 2017 10:33 AM

    carolyn.foster - Wednesday, July 5, 2017 10:26 AM

    Yes that's the issue.  I've tried different ways of getting the data for my parameters to no avail.

    That's what I thought.
    On the first parameter, depending on what they pick, set the second set of parameters instead of depending on the refresh of the parameters. So a manual refresh basically.

    Sue

    Specifically, you may want to consider using additional datasets to supply a set of values as choices for a drop-down for each parameter.   That way, you can default the parameters the same way, and if you include NULL as a possible value in the datasets you add, you're covered.   If you use the original choice parameter as input to each of the other two datasets that control the actual parameters, you'll get the desired behavior.   Especially if you return ONLY a NULL value for those parameters that should be NULL given the choice parameter.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 6 posts - 1 through 5 (of 5 total)

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