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

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. Ensure “everyone” has browse access to the images folder, (or confirm that the user running the report 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/ReportServer", Globals!ReportServerUrl) + "?%2fimages%2fimage.png"

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

Advertisements
Categories: Reporting Services
  1. Deron
    13 January, 2011 at 3:35 pm

    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

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: