0

In a SSRS2008R2 report with an action linked to a field value; this code is working (from here):

="FILE:\\E:\SharedServer\"+Fields!PDFFileName.Value

Then I wrapped it with JavaScript to open in a new window and it is failing.

="javascript:void(window.open('FILE:\\E:\SharedServer\'+Fields!PDFFileName.Value','_blank'))"

The mouse hovers shows a hyperlink but when I click on it, absolutely nothing happens. I had posted before but this is a new issue. I've tried several minor variations with the quotation marks but have not hit upon the correct syntax.

Community
  • 1
  • 1
turkaffe
  • 100
  • 2
  • 12

1 Answers1

1

You are missing some double quotes and a + sign:

="javascript:void(window.open('FILE:\\E:\SharedServer\" + Fields!PDFFileName.Value + "','_blank'))"

But I'm not even sure if that will work; some other posts (like Opening a file in local file system in javascript) indicate that javascript can't do this.

Community
  • 1
  • 1
stubaker
  • 1,928
  • 1
  • 23
  • 25
  • The code is working (when I get Chrome to show the report). And, thanks for the link to the IE issue. – turkaffe Aug 29 '14 at 15:10