0

I have a few reports that show a link to invoices (.pdf files) that are held on our network share.

I use this on the text box property to to action to allow the user to click on it and view the invoice:

="javascript:void(window.open('file:"+Fields!invoice_link.Value+"','_blank'))"

When the report is running, I can hover over the link and the correct link address is displayed in Chrome and Edge :

Hover link

When I click on the link, both EDGE and CHROME do nothing. When I right click and select open in new tab / window - it get this :

enter image description here

This works fine as expected in Internet Explorer - but this is no longer an option.

Things I've done so far :

  • I have allowed popup in both browsers

  • I have added the reportserver site as trusted site in security settings

  • I have added extensions that allow Local file links in the browser

  • I have allowed javascipt to run

Nothing seems to make any difference in opening the link.

I have confirmed that the file that the invoice_link field resolves to is available and accessible.

Does anyone have any other ideas? I can't seem to find anything other than the javascript option to open files

Harry
  • 2,636
  • 1
  • 17
  • 29
  • 1
    it's probably a protocol issue - i.e. modern browsers tend to prevent access to `file:///` URLs for security reasons ... pretty sure there's a command line option for Chrome, and therefore probably Edge, that will turn off this "protection" - it used to be `--allow-file-access-from-file` though, it's probably changed since 2013 – Bravo Jun 16 '22 at 02:37
  • 1
    I'm assuming the page is loaded using `file:///` protocol of course – Bravo Jun 16 '22 at 02:43
  • @KJ - I've removed the blank and it makes no difference unfortunately. Same behavior. – Harry Jun 16 '22 at 03:02
  • @Bravo - chrome with the mentioned --allow-file-access-from-file made no difference. Same behavior. what do you mean by file:/// ? why 3 slashes? It resolves only to file:// – Harry Jun 16 '22 at 03:03
  • 1
    file procotol usually looks like file:/// ... URL's are `protocol://` `host` `/path` ... so file always looks like `file:///` ... doesn't it? since the host is nothing – Bravo Jun 16 '22 at 03:40
  • @Bravo the file link is (and always has been) file://server/path/filename.pdf .. (only 2 slashes and not three).. this worked in IE.. just not in Chrome and Edge.. – Harry Jun 16 '22 at 04:02
  • 1
    sorry if I confused you ... I've never seen a "server" in a `file://` URL before, I'm sure it's valid - but then, I NEVER use html over anything other than http[s] - regardless ... `file://` protocol is severely limited in modern browsers - that's why it works in IE and nothing else - did you know that Edge has an IE mode? – Bravo Jun 16 '22 at 05:03
  • Thanks everyone for your comments. Looks like the only way forward is to remove the Javascript. – Harry Jun 20 '22 at 05:02

0 Answers0