SSRS SQL Server Reporting Services – How to reference an external image hosted on the report server

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:

[csharp]
=IIf(Globals!ReportServerUrl is nothing,
"http://localhost/ReportServer",
Globals!ReportServerUrl) + "?%2fimages%2fimage.png"
[/csharp]

Two things of interest in this code:
1. There is a ? after the http:///ReportServer path
2. 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.

And now it all works both in the IDE and the deployed report.

Cheers

1 thought on “SSRS SQL Server Reporting Services – How to reference an external image hosted on the report server

  1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.