2
votes

I have a SSRS 2005 report that has a number of images in it. The way that I have the images included is I have an image object with the URL set in the value property. The actual images are hosted by an IIS virtual directory on the same server. I'm doing it this way because I need to dynamically change the image source using an expression depending on the data within the report.

The problem is that the images work great when previewing the report in Visual Studio but do not display when the report is deployed. When I look at the HTML rendered by SSRS the SRC attribute of the image tag is an empty string.

8

8 Answers

4
votes

I have had this problem before.

You should check to see if you have any warnings being thrown when you deploy the reports. A rsWarningFetchingExternalImages warning means that reporting services is having problems anonymously accessing the images. This could be because anonymous access is not properly configured in IIS or, as in my case, you could possibly have a problem with the MIME type for the image you're hosting. I was trying to host PNG files and it worked when I changed the images to GIFs.

1
votes

Set Anonymous authentication ENABLED in IIS on that images folder.

0
votes

I am by no means an IIS expert, that's why I just gave up and went with converting to GIF files, but from the research I did before giving up, I can tell you that not all versions of IIS support the PNG MIME type by default. I have tried following the directions at http://www.hostmysite.com/support/dedicated/IIS/newmime/ to add the PNG MIME Type to my virtual directory, but it didn't work for me. (Remember to redeploy after trying this, as I think this is when RS reconciles the image URLs) Perhaps someone with more knowledge on MIME Types is IIS might have some input.

0
votes

I have seen this problem on SSRS2005 when the Service Pack (2 or 3) has not been applied.

0
votes

I had the same problem, i just figured out it was authorization issue on the folder. I had to add the rule in web.config file to allow all users to access images

// assuming Images is the folder where images are to retrieve

< location path="Images" >
    < system.web >
      < authorization >
        < allow users="*" / >
       < /authorization >
    < /system.web >
  < /location >

Ref : http://msdn.microsoft.com/en-us/library/wce3kxhd(v=vs.100).aspx

0
votes

The folder where the images are hosted needs to have permissions to everyone. In addition, if you are deploying reports in Share Point, you need to add the following web.config to that folder.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <security>
       <authentication>
         <anonymousAuthentication enabled="true" />
       </authentication>
    </security>
  </system.webServer>
</configuration>
0
votes

If you are using an image has too large DPI, SSRS will render it very large and may not display in the image box unless you set its attributes to fit within.

"Image rendering in SSRS is hard-coded at 72 96DPI. Not only that, it will assume the original image is 96DPI, so a 300DPI image will end up being rendered appr. 3.1 times larger than expected"

0
votes

Is your image transparent PNG and is it being placed in the cell of a table?

A common mistake is to place an image like a png inside a textbox. This will cause the problem where it will show in the design screen but in preview will stop working