Display image with reportviewer from ftp RRS feed

  • Question

  • 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")
                Dim img() As Byte = request.DownloadData(imageURL)
                Return img
           Catch ex As Exception
                Return Nothing
           End Try
        End Function

    Also I enable EnableExternalImages

               this.reportViewer1.LocalReport.EnableExternalImages = true;

    I wrote expression 

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

    Image source = Database

    MiME Type = Image/Jpeg

    I store the Path on My Database like

    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 , Could any one help

    • Moved by Fred Bao Thursday, July 31, 2014 10:05 AM
    Saturday, July 26, 2014 9:52 PM

All replies