Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I wrote custom code to supply username and password
VB
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

Also I enable EnableExternalImages
C#
this.reportViewer1.LocalReport.EnableExternalImages = true;

I wrote expression
=Code.testimage(First(Fields!Pic_Path.Value, "Dataset1"))
Image source = Database<br />
MiME Type = Image/Jpeg

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 !!!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900