RDLC报告超链接在浏览器中不起作用 [英] RDLC Report hyperlink are not working in browser

查看:616
本文介绍了RDLC报告超链接在浏览器中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的rdlc报告中存在超链接问题。我通过应用步骤在本教程中。(虽然看起来很容易)

I have a problem with hyperlinks in my rdlc report. I configured a tablix's textbox by applying steps in this tutorial.(It seems very easy though)

似乎超链接无法在reportviewer控件(我的意思是当我想在浏览器中报告)但是当我将该报告导出为PDF时,所有这些链接都起到了闪耀的作用。

It seems to hyperlinks are not working in the reportviewer control (I mean when I look to report in browser) but when I export that report to PDF all these links works as shine.

我尝试将enableHyperlinks选项设置为true 。
我在不同的浏览器中试过。

I tried setting enableHyperlinks option to true. I tried in different browsers.

任何关于我可能出错的评论都是适当的。

Any comment on where could I be wrong is appriciated.

推荐答案

我不确定这是否与您的具体问题有关,但我最近发现,如果您将操作设置为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 _
) 

这篇关于RDLC报告超链接在浏览器中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆