我将图像保存在//servername/foldername/image1.jpg上的文件夹中,并为此文件夹创建了一个网站http:// Images。在我的报告中,如果图像不可用,我试图显示noImage.jpg。
为此,我创建了default.aspx。此default.aspx将图像名称"image1"作为参数,如果找不到该文件(image1.jpg)则返回noImages.jpg并且它与图像位于同一文件夹中。报告上的图像控件具有source = External。当值设置为http://images/images1.jpg时,它会显示图像,但是当我将其更改为 "http:// Images / default.aspx?ID ="&参数!imagesname.value有红色x。 当我从浏览器调用http:// Images / default.aspx?ID = image1时它可以工作。
解决方案嗨dec2791, 默认情况下,不启用外部图像。你可以通过api打开它们。 msdn.microsoft/en -us /库/ microsoft.reporting.webforms.localreport.enableexternalimages(VS.80)的.aspx
I have images saved in a folder on //servername/foldername/image1.jpg and created a website Images for this folder. On my report I am trying to display noImage.jpg if the images are not available.
For this I have created default.aspx. This default.aspx takes image name "image1" as parameter andif it cannot find the file (image1.jpg) returns noImages.jpg and it is in the same folder as images. The image control on the report has source=External. When value is set to images/images1.jpg it displays the image but when I change it to "Images/ default.aspx?ID=" & parameter!imagesname.value there is red x. When i call Images/ default.aspx?ID=image1 from a browser it works.
解决方案 Hi dec2791,By default, external images are not enabled. You can turn them on via the api. msdn.microsoft/en-us/library/microsoft.reporting.webforms.localreport.enableexternalimages(VS.80).aspx更多推荐
外部图像不会显示
发布评论