且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

RDLC报告超链接在浏览器中不起作用

更新时间:2023-02-25 17:43:10

我不确定这是否与您的具体问题有关,但我最近发现,如果您将操作设置为URL,则必须是完整的URL,而不是相对的。

I'm not sure if this relates to your specific problem or not, but I have recently discovered that if you set the action to URL, it must be a full URL, and not a relative one.

例如,如果您将URL设置为

For instance, if you are setting the URL as

="MyPage.aspx?myprop=" & Fields!SomeProp.Value

结果将是实际上没有超链接添加到字段中。

The result will be that no hyperlink is actually added to the field.

但是,如果你有类似的东西

However if you had something like

="http://localhost/MyPage.aspx?myprop=" & Fields!SomeProp.Value

它应该可以正常工作,因为这是一个完整的URL

it should work just fine, because that is a full URL

这当然会带来不知道应用程序在哪里的问题。例如,如果将其设置为localhost然后将其放在生产服务器上,那么大多数人可能会失败。

This, of course, brings up the problem of not knowing where the application is. For instance, if you set this to localhost and then put this on the production server it would probably fail for most people.

为了处理这种情况,您需要添加一个参数以从网页传入基本URL,然后添加其余部分。

In order to handle that scenario, you will need to add a parameter to pass in the base URL from the web page and then add the rest.

= String.Format( _
     "{0}/MyPage.aspx?myprop={1}", _
     Parameters!BaseUrl.Value, _
     Fields!SomeProp.Value _
)