Create a hyperlink to local files in my report

Hi, I was wondering if it was possible to create a hyperlink to a local file when generating a report:

In my xlst style sheet I generate a hyperlink so, but when I click on it it fails to open the file. (I use file uri like file///C:\Pathtofile)

<a href="{@FullPath}">Path to File</a>
6 Replies Latest Replies: 3 May 2016 11:01 AM by Romulus Crisan < 1   2  >
  • You need to use the file protocol to create a link to a local file. In your example you are almost correct but is missing ":" , so it should be something like file:///C:\Pathtofile.


  • In reply to Romulus Crisan:

    Hi Romulus,

    Sorry my question was unclear. I can create a hyperlink, the problem is you cannot open the file by clicking on it.

    Here is what happens when I click the link on my PC: (In English, "This page cannot be displayed") (sorry my question I mistyped the file protocol, but it is correct in the xlst)

    Is this an infragistics control? Basically I want the log file I created to open in the default text editor when you click the link.

  • In reply to Jesse Good:

    The viewer is just the standard .net WebBrowser control. Your problem is that the report is not shown at all or that when you click the log file this message appears?

  • In reply to Romulus Crisan:

    Hi Romulus,

    It's the latter, "that when you click the log file this message appears".

    I figured out the problem. It is because there is Japanese characters in the filename.

    I tried encoding the URL like below and a few other ways but no luck:

    new Uri(fileName).AbsoluteUri


    I think this is a limitation with the WebBrowser control perhaps.

    It works as long as there are no special characters in the filename, so one workaround is to strip non-Ascii characters.

  • In reply to Jesse Good:

    Hi Jesse,

    You can use UrlPathEncode to encode your file path properly. See also here:
< 1   2  >