February 8, 2016 at 5:08 pm
Hey guys,
I'm trying to add a link to a report that downloads the report itself to PDF. I'm using the following expression in the action for the text box:
=iif(Fields!Policy_Status.Value = "In-Force","Globals!ReportServerUrl" & "?/ReportFolder/ReportName&rs:Command=Render&policyno=" & Fields!Policy_No.Value & "&rs:Format=PDF",nothing)
This works if the user has been granted access to SSRS explicitly, but if the user is accessing the reports through a ReportViewer control in a web app they get an access denied error (which makes sense).
Has anyone tried implementing a similar process for rendering a report to PDF?
I'm using SSRS 2012.
Chris
February 8, 2016 at 6:14 pm
I have done this using the ReportViewer control by spinning up an alternate Windows Identity in the background that has access to the SSRS Web Services (report server directly) but never through a link in a rendered report. Basically I have a button on a Web Form that says "Get PDF". We render all the parameters on the page too, however, using the Web Services to get those so possibly a totally different implementation than you.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 8, 2016 at 7:44 pm
Yeah it sounds a little different.
I'm starting to think we'll have to create a custom security extension to facilitate this. It just sounds quite complicated.
February 8, 2016 at 8:10 pm
Any reason why they cannot just use the standard Export dropdown available in the ReportViewer to get the PDF version?
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 8, 2016 at 8:14 pm
"The client experience"
To be honest, we may have to stick with that option.
February 11, 2016 at 12:55 pm
Not sure if this answers you.
I had a similar request to create a URL on an existing report to download open/render a report directly in pdf. My report had a parameter of year which had to come from the parent report.
Both the parent and sub report were deployed to the same folder
I used this as an action on the text/texbox - go to URL and set this as the URL expressions:
="http://ohtwi1sql002/ReportServer_BGCO/Pages/ReportViewer.aspx?%2fDEV+AND+QA%2fDirector+Scorecard%2fBGCO+Summary+pdf_print&rs:Format=PDF&year=" + Parameters!year.Value
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply