Multiple images on a report

Sym

Registered User.
Local time
Today, 12:12
Joined
Feb 21, 2015
Messages
40
I have a Sales Order form that has a sub-form. the parent form has all the basic customer info like company name, date, and so on. The subform has all the products they are buying. Once that is complete i have a report that pops up via a button that can be an invoice or quote for that order.

What i need to add to the reports is an image of all the products they bought. I know how to get one on a report by putting in an image frame and linking the product image filepath but how do i get multiple images dependent on how many products they bought. For instance if they bought 1 item i only want that 1 picture to show up, if they bought 3 i need 3 to show up.

Thanks for your time
let me know if you need more info
 
In the detail band,on print event,
Put your loadimage()
 
just a suggestion create a field in your product table that will hold the path of the corresponding image of that product.

on your report, drag the "new field" that you created above on the detail section.
make it's property Visible=false.

on the detail OnPrint event:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.yourImageNameHere.Picture = Me.[the new field name here] & ""
End Sub
 
The Path should be common that should be set-up once. Providing the Image is named as the ProductID you can reference that image by combining the common path and the imageID and file type. If you want images in one directory for a supplier then you can set-up the directory on the supplier and then just concatenate that path into the string to fetch the image.

Simon
 

Users who are viewing this thread

Back
Top Bottom