C# – RDLC Report hyperlink are not working in browser

chyperlinkrdlcreportviewer

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)

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.

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

Any comment on where could I be wrong is appriciated.

Best Answer

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.

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

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

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.

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 _
) 
Related Topic