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.
我有一份SSRS 2005报告,其中包含许多图像。我包含图像的方式是我有一个图像对象,其URL设置在value属性中。实际映像由同一服务器上的IIS虚拟目录托管。我这样做是因为我需要根据报表中的数据使用表达式动态更改图像源。
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.
问题是,在Visual Studio中预览报表时图像效果很好,但在部署报表时不显示。当我查看SSRS呈现的HTML时,图像标记的SRC属性是一个空字符串。
6 个解决方案
#1
4
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.
您应该检查在部署报告时是否有任何警告被抛出。 rsWarningFetchingExternalImages警告意味着报告服务在匿名访问映像时出现问题。这可能是因为在IIS中未正确配置匿名访问,或者在我的情况下,您可能会遇到托管图像的MIME类型问题。我试图托管PNG文件,当我将图像更改为GIF时,它工作正常。
#2
1
Set Anonymous authentication ENABLED in IIS on that images folder.
在该映像文件夹上的IIS中设置匿名身份验证ENABLED。
#3
0
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.
我绝不是IIS专家,这就是我放弃转换为GIF文件的原因,但是从放弃之前的研究中我可以告诉你,并非所有版本的IIS都默认支持PNG MIME类型。我已尝试按照http://www.hostmysite.com/support/dedicated/IIS/newmime/上的说明将PNG MIME类型添加到我的虚拟目录中,但它对我不起作用。 (记得在尝试之后重新部署,因为我认为这是RS协调图像URL的时候)也许对MIME类型有更多了解的人可能会有一些输入。
#4
0
I have seen this problem on SSRS2005 when the Service Pack (2 or 3) has not been applied.
我没有应用Service Pack(2或3)时在SSRS2005上看到此问题。
#5
0
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
我遇到了同样的问题,我只知道它是文件夹上的授权问题。我必须在web.config文件中添加规则以允许所有用户访问图像
// assuming Images is the folder where images are to retrieve
//假设Images是要检索图像的文件夹
< 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
参考:http://msdn.microsoft.com/en-us/library/wce3kxhd(v = vs.100).aspx
#6
0
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.
托管图像的文件夹需要拥有每个人的权限。此外,如果要在Share Point中部署报表,则需要将以下web.config添加到该文件夹。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</configuration>
#1
4
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.
您应该检查在部署报告时是否有任何警告被抛出。 rsWarningFetchingExternalImages警告意味着报告服务在匿名访问映像时出现问题。这可能是因为在IIS中未正确配置匿名访问,或者在我的情况下,您可能会遇到托管图像的MIME类型问题。我试图托管PNG文件,当我将图像更改为GIF时,它工作正常。
#2
1
Set Anonymous authentication ENABLED in IIS on that images folder.
在该映像文件夹上的IIS中设置匿名身份验证ENABLED。
#3
0
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.
我绝不是IIS专家,这就是我放弃转换为GIF文件的原因,但是从放弃之前的研究中我可以告诉你,并非所有版本的IIS都默认支持PNG MIME类型。我已尝试按照http://www.hostmysite.com/support/dedicated/IIS/newmime/上的说明将PNG MIME类型添加到我的虚拟目录中,但它对我不起作用。 (记得在尝试之后重新部署,因为我认为这是RS协调图像URL的时候)也许对MIME类型有更多了解的人可能会有一些输入。
#4
0
I have seen this problem on SSRS2005 when the Service Pack (2 or 3) has not been applied.
我没有应用Service Pack(2或3)时在SSRS2005上看到此问题。
#5
0
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
我遇到了同样的问题,我只知道它是文件夹上的授权问题。我必须在web.config文件中添加规则以允许所有用户访问图像
// assuming Images is the folder where images are to retrieve
//假设Images是要检索图像的文件夹
< 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
参考:http://msdn.microsoft.com/en-us/library/wce3kxhd(v = vs.100).aspx
#6
0
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.
托管图像的文件夹需要拥有每个人的权限。此外,如果要在Share Point中部署报表,则需要将以下web.config添加到该文件夹。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</configuration>