views:

4484

answers:

7

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 and IIS virtual directory on the same serer. 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.

+3  A: 

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.

Colin
A: 

I am getting this problem with PNG files. It is not an option for me to change the type to GIF as this is a link to an external image.

Could you please elaborate on you original solution?

A: 

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.

Colin
A: 

i am having the same problem when i try to show an image based on a parameter, changing image value with a SWITCH statement. In Visual Studio is ok, images are deployed in the server, but when I access report in Report Server the img tag is empty. but if i add those gif and png images without any conditions they are shown ok. What can it be??? Any ideas

A: 

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

daftspaniel
A: 

check the folder has permission to access.

rafiq
A: 

We're having this problem, too. It isn't just for .png files from the SSRS ReportViewer: it breaks display of all .png files - from anywhere. Like: google's logo.

It appears to be a permissions issue on the local PC: once inflicted with this problem, only users with elevated credentials can view .png files in the browser. Others get the red-X.

So far, we've only "broken" two PCs. Before we let users start viewing the shiny new SSRS reports we're building... we want to find a preventative for this annoyance. Any ideas?

ms2u