Report Deeplink to Bookmark for User

  • Hi there,

    is there easy/generic way to create a deeplink to bookmark an report with the selected parameters?

    The Reporting Service it self seems to be able to create it, as if you create an email subscription you can add a "link to report" that contains all your parameters that you change you made to the default values of the parameters.

    So is there a way to easily show this in the report depending on the Parameter-Selektion above or do I have to create something on my own?

    Kind Regards,

    Christian

  • Hi Christian,

    It's not too hard to do this and you can genericise it to a point. You can use the globals to put together the URL but you need to add the parameters yourself as there is no way to return the parameter name in SSRS.

    It will look something like the below, I'll break it down.

    =Globals!ReportServerUrl & "?"

    & Globals!ReportFolder & "%2f"

    & Globals!ReportName

    & "&ReportParameter1=" & Parameters!ReportParameter1.Value

    & "&ReportParameter2=" & Parameters!ReportParameter2.Value

    & Join(Parameters!MultiValue.Value, "&MultiValue=")

    & "&rs:ParameterLanguage=en-GB&rs:Command=Render"

    This returns the ReportService url, report path and report name. When going via URL access you add the command starts after the "?", which you have to add yourself. You also need to add the "/" between the folder and reportname (this is the %2f")

    =Globals!ReportServerUrl & "?"

    & Globals!ReportFolder & "%2f"

    & Globals!ReportName

    Parameters are added to the URL separated by ampersands. Since you can't get the parameter name programmatically you'll have to add these yourself as a "&ParamName=Value" pair. The whole thing needs to be a string so you may need to use Format() to return string values for some types.

    & "&ReportParameter1=" & Parameters!ReportParameter1.Value

    Multivalue parameters are supported. They are added by have a "&Param=Value" pair for each value. You can do this with a join like below. Use sparingly though or the URL will get too long.

    & Join(Parameters!MultiValue.Value, "&MultiValue=")

    Finally the parameter language tells SSRS how to interpret the parameters being passed, otherwise it will use the user's browsers setting. Essential if you are using dates, often browsers are defaulted to US language settings. The last part tells SSRS to render the report to the browser. There are other settings, you can switch toolbars off etc or render direct to Excel. It's all here https://msdn.microsoft.com/en-GB/library/ms153586%28v=sql.110%29.aspx.

    & "&rs:ParameterLanguage=en-GB&rs:Command=Render"

    You can stick the above formula into an action and the link will be clickable.

Viewing 2 posts - 1 through 1 (of 1 total)

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