Mark Williams
Mark Williams

Reputation: 612

Reporting Services dynamic image source URL problems

I have a report in SQL Reporting Services 2008 R2 that includes an image whose source is given by an expression. The image won't render though. This report was moved from a 2005 machine where it works just fine.

The image source is set to:

="http://example.com/SiteMap/Directory/EmployeePhotos/" + rtrim(Fields!employee_id.Value) + ".jpg"

Which should render out to this source in the actual report:

http://example.com/SiteMap/Directory/EmployeePhotos/275.jpg

Instead I just get an empty image spacer; when I look at the properties in IE I get a bunch of "Not Available" values.

I set up a row in my report with the exact expression above and it gives the expected value.

Again, the image works just fine on the 2005 box and it looks fine when it's rendered in VS 2010. Any ideas? Thanks as always for your help.

Upvotes: 1

Views: 2835

Answers (1)

Mark Williams
Mark Williams

Reputation: 612

The reporting server grabs the image, not the browser. This means the service account, not just the user, must have access to the external resources.

The good news is you don't need to change the actual account under which SSRS runs. Reporting services allows you to assign an execution account which SSRS will use to get external resources. Set up an account that has access to the resources, then set that account as the execution account in SSRS configuration manager. Easy.

Upvotes: 1

Related Questions