SSRS: Relative URL Hyperlink

前端 未结 5 1580
粉色の甜心
粉色の甜心 2021-01-12 08:04

In SSRS 2008 I would like to create a relative path URL. Long story short I have a subscription that outputs a few thousand static HTML pages to a folder that is used as co

相关标签:
5条回答
  • 2021-01-12 08:22

    If you look at the warning generated when you run the report in Visual Studio you'll get your answer:

    [rsInvalidURLProtocol] The value ‘test.html’ of the Hyperlink property of the text box ‘textbox6’ has an invalid schema. URLs in reports may only use http://, https://, ftp://, mailto: or news:

    i.e. URLs must have one of those protocols, and since there's no way of writing a relative URL when it starts with the protocol that means SSRS doesn't support relative URLs.

    An alternative would be to set the base URL in a parameter, which would then be easily changed and would only require regenerating your html pages if it changes.

    0 讨论(0)
  • 2021-01-12 08:29

    In Visual Studio 2013 with SQL Server Data Tools you can access the property pages for a label. This gives the option to link to another report (in the same project) and pass any parameters as required:

    0 讨论(0)
  • 2021-01-12 08:34

    Just use global variable Globals!ReportServerUrl

    So "http://myservername/rs?/myreportname" becomes Globals!ReportServerUrl + "?/myreportname"

    0 讨论(0)
  • 2021-01-12 08:39

    Just read this Q and A and have a better solution for anyone looking. If you want relative url then just use javascript e.g.

    ="javascript:void(window.navigate( '/mydirectory/reportcountry.aspx?CountryID=" + Fields!CountryID.Value.ToString() + "'))"
    
    0 讨论(0)
  • 2021-01-12 08:40
    ="javascript:void(window.open(document.URL.replace('CurrentReportName','NavigateToReportName'),'Window1','menubar=no,width=430,height=350,toolbar=no'));"
    

    I know it's a old post. it may help someone..Note: I am using SSRS 2008

    0 讨论(0)
提交回复
热议问题