Ok,
I needed to do this the other day, after an hour or so I finally got it.
Issue, I have an images directory that is deployed to the report server with my reports, It is hidden in the tile view.
The problem, how to insert an image into my report that references the images directory hosted on my report server.
Well after a while of struggling with it I noticed this little perl of information in the warnings for my report;
[rsWarningFetchingExternalImages] Images with external URL references will not display if the report is published to a report server without an UnattendedExecutionAccount or the target image(s) are not enabled for anonymous access.
So to make this work do the following
1. Setup an unattended execution account, (See the Execution pane in the Reporting Services Configuration Tool)
2. ** Very Important ** Ensure “everyone” has browse access to the images folder, (or confirm that the unatteneded execution user has access to the images folder)
3. In your report set the URL of your image with an expression like the following:
=IIf(Globals!ReportServerUrl is nothing,
"http://localhost",
Globals!ReportServerUrl + "?") + "%2fimages%2fimage.png"
Two things of interest in this code:
- There IS a ? after the http:///ReportServer path
- This expression uses the localhost when in the IDE preview window and the full reportserverUrl when deployed to a server. I didn’t want to hard code localhost for a production deployed report
- I am running a IIS server on my own machine port 80 with the images matches what is deployed to production
And now it all works both in the IDE and the deployed report.
Cheers
Thanks, much. The way the Microsoft docs are written, I and several hundred people skipped that the SSRS Unattended Execution Account still needs to be granted SSRS perms (e.g. Browser role) on the Report Server in addition to just configuring that account in the SQL Server Reporting Services Configuration Manager. Sometimes the simple can be overlooked by taking someone (i.e. Books online) too literally.
Thanks so much!!
DSD