Results 1 to 6 of 6

Thread: Print Picture in Data Report

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    Print Picture in Data Report

    hello!
    how can i print picture in a data report?
    assuming i have already path saved to the database.
    ex: fieldname: picture_path
    picture_path= C:\pix\sample.jpg

    is this possible?

    tnx!
    *****************
    VB6,PHP,VS 2005

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Print Picture in Data Report

    Are you trying to display a picture with every record on the report? Unfortunately you can't. The rptImage control cannot be bound to a datasource like the rptTextBox control. It is used for things like displaying a company logo on the page header.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    Re: Print Picture in Data Report

    yes the rptImage, is there any other way to print the image?
    *****************
    VB6,PHP,VS 2005

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Print Picture in Data Report

    Again, if you mean print a different image for each record within the details section then the answer is you can't.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    Re: Print Picture in Data Report

    printing Image in Data Report is possible, after long way of searching eventually i found the sol'n. here i will share to you

    Code:
     Dim rpt As New rpt
         DE1.rsCommand2.Open "SELECT * FROM tbl", con, adOpenDynamic, adLockOptimistic
         If DE1.rsCommand2.EOF <> True Then
      With rpt.Sections("Section4")
          Set .Controls("Image1").Picture = LoadPicture(CStr(DE1.rsCommand2.Fields(0).Value))
         End With
       End If
    *****************
    VB6,PHP,VS 2005

  6. #6
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Print Picture in Data Report

    That prints a single Image in the Report Header which I never said was impossible. But you cannot use the same rptImage control to print differrent images within the details section.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width