image in datareport

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • indhu
    New Member
    • Oct 2006
    • 140

    #1

    image in datareport

    Hi guys

    i ve image path in MS access. how to bring tht to datareport.?

    any idea of this.
    thanks
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by indhu
    Hi guys

    i ve image path in MS access. how to bring tht to datareport.?

    any idea of this.
    thanks

    No... idea

    Comment

    • Dököll
      Recognized Expert Top Contributor
      • Nov 2006
      • 2379

      #3
      Do you mean to say you know the path to your Access table and you're wondering how to bring this table to DataReport?

      Dököll

      Comment

      • slapshock
        New Member
        • Oct 2006
        • 57

        #4
        just get the path of the image....
        data report has the properties that can retrieve image from database..
        just see in its properties

        Comment

        • indhu
          New Member
          • Oct 2006
          • 140

          #5
          Originally posted by slapshock
          just get the path of the image....
          data report has the properties that can retrieve image from database..
          just see in its properties
          there is not property like that

          ive declared this in cmd button, it shows current image of the form. i didnt get the image dynamically

          With DataReport1.Sec tions(3)
          Dim i As Integer

          Set .Controls("imag e1").Picture = Form4.Image1(i) .Picture
          Set .Controls("imag e2").Picture = Form4.Image1(1) .Picture
          End With

          anyway of change the image dynamically?

          thanks guys for ur kind reply to my post.

          Comment

          • markmcgookin
            Recognized Expert Contributor
            • Dec 2006
            • 648

            #6
            Code:
            Dim MyImage As Bitmap  ' Image to import into Picturebox
            
            Public Sub ShowImage(ByVal fileToDisplay As String)
            
                    If Not (MyImage Is Nothing) Then
                        MyImage.Dispose()
                    End If
                    MyImage = New Bitmap(fileToDisplay)
                    pboxPreview.Image = CType(MyImage, Image)
                End Sub
            
            **In later piece of code, i.e. Sub 123 Handles () etc ***
            
                        ImagePath = "my documents\images\" & IdSEL & ".jpg"
            
                        ShowImage(ImagePath)
            NB - IdSEL is the id of the pic you want to display, e.g. if ID = 001, the pic must be in My Documents\image s\, and be called 001.jpg

            Does that help?

            Comment

            Working...