Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 ssrs 2008 r2 report display a PDF document

Author  Topic 

jassie
Constraint Violating Yak Guru

332 Posts

Posted - 2013-11-25 : 17:34:55
In an existing SSRS 2008 r2 report, I want to be able to display a PDF document when the user clicks on a link. I know that if I click on text box properties, and then select

an action, and then select a url refernce, this will bring up the PDF document I want to access. My problem is how do I point to a file that is on my workstation and how do I

point to a file that is on a sever?

I haver tried the fofllowing expression options like the following:
1. ="FILE:\\D:\SSRS\Images\Help.pdf",
2. D:\SSRS\Images\Help.pdf, and
3. ="D:\SSRS\Images\Help.pdf".

None of the above options work. Thus can you tell me how to access the location of the Help.pdf file so that the SSRS report will know where the PDF document is located and

will display the report for the user to access?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-11-26 : 06:37:03
did you try using
=javascript:void(window.open("FILE:\\D:\SSRS\Images\Help.pdf","_blank"))

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

jassie
Constraint Violating Yak Guru

332 Posts

Posted - 2013-11-26 : 09:41:21
I did not use the javascript you showed as an idea. I will try it.

WThat does the _blank parameter value used for?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-11-26 : 09:56:30
quote:
Originally posted by jassie

I did not use the javascript you showed as an idea. I will try it.

WThat does the _blank parameter value used for?


open doc in new window

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

satkum
Starting Member

2 Posts

Posted - 2014-01-28 : 07:27:51
I am trying to open a jpeg from my local drive, I am using following code
="javascript:void(window.open('FILE:\\C:\myfolder\sample.txt','_blank'))"

1>I created a text field
2>in action tab of properties tab I selected go to URL
3>I used above java script

system does not give error but, does not open text file
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-28 : 07:51:05
quote:
Originally posted by satkum

I am trying to open a jpeg from my local drive, I am using following code
="javascript:void(window.open('FILE:\\C:\myfolder\sample.txt','_blank'))"

1>I created a text field
2>in action tab of properties tab I selected go to URL
3>I used above java script

system does not give error but, does not open text file


is the report deployed in your local machine?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

satkum
Starting Member

2 Posts

Posted - 2014-01-28 : 11:18:45
yes, in preview mode I am try to open the file , i haven't deployed the report yet
Go to Top of Page

jassie
Constraint Violating Yak Guru

332 Posts

Posted - 2014-01-29 : 11:49:20
Thanks for helping solve this issue!
Go to Top of Page
   

- Advertisement -