使用来自ftp的reportviewer显示图像 [英] Display image with reportviewer from ftp

查看:102
本文介绍了使用来自ftp的reportviewer显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了自定义代码以提供用户名和密码

I wrote custom code to supply username and password

Public Shared Function testimage(ByVal imageURL As String) As Byte()
      Dim request As System.Net.WebClient = New System.Net.WebClient()
      request.Credentials = New System.Net.NetworkCredential("Ftpuser", "1234567", "myPcname")
      Try     
            Dim img() As Byte = request.DownloadData(imageURL)
            Return img
       Catch ex As Exception
            Return Nothing
       End Try
    End Function



我也启用EnableExternalImages


Also I enable EnableExternalImages

this.reportViewer1.LocalReport.EnableExternalImages = true;



我写的表达

= Code.testimage(First(Fields!Pic_Path.Value,数据集1))


I wrote expression
=Code.testimage(First(Fields!Pic_Path.Value, "Dataset1"))

Image source = Database<br />
MiME Type = Image/Jpeg



我将Path存储在我的数据库中,如 ftp://192.168.111.1:1234/1.jpg

我在测试解决方案中测试VB代码并且工作正常所以我想到目前为止一切都很好但是毕竟图像没有显示在报告上所以可能有人告诉我我想念的是什么

我检查那些链接

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e3e98956 -0b7c-498a-9a3a-86ec7b426cfa / display-image-from-ftp-server-folder-in-the reportviewer-and-ftp-folder-has-username-password?forum = sqlreportingservices [ ^ ]

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e3e98956-0b7c-498a-9a3a-86ec7b426cfa/display-image-from-ftp-server-folder-in- -reportviewer-and-ftp-folder-has-username-password?forum = sqlreportingservices [ ^ ]

所以任何建议!


I store the Path on My Database like ftp://192.168.111.1:1234/1.jpg
I test VB Code in test solution and it works fine So i guess everything so far is good but after all the Image is not displaying on the report so could some one tell me what i miss
I check those links
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e3e98956-0b7c-498a-9a3a-86ec7b426cfa/display-image-from-ftp-server-folder-in-the-reportviewer-and-ftp-folder-has-username-password?forum=sqlreportingservices[^]
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e3e98956-0b7c-498a-9a3a-86ec7b426cfa/display-image-from-ftp-server-folder-in-the-reportviewer-and-ftp-folder-has-username-password?forum=sqlreportingservices[^]
So Any suggestion !!!

推荐答案

这篇关于使用来自ftp的reportviewer显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆