Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report with columns (3) 1

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
586
GB
I want a report to display 12 photos (from 12 different records) on one page, but in three columns. (i.e. 4 photos in three columns).

Is this posible in access?????

Many thanks.

Mark
 
Mark,
That's funny, I have a report I wrote for a customer which does exactly that...

What I did is put 12 unbound Image Controls in the Detail section of the report, then in the Print Event (of the detail section), looked at the fields which contained the path to the images. If the field is not null, I set the image control source to the path to the appropriate image. If the field is null, set the control to not visible.

Here's a snippet:
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

If Not IsNull([01]) Then
  Image1.Visible = True
  Image1.Picture = [01]
 Else
  Image1.Visible = False
End If
If Not IsNull([02]) Then
  Image2.Visible = True
  Image2.Picture = [02]
 Else
  Image2.Visible = False
End If

I don't know if anyone has warned you, but you should try to avoid storing the images in the database. While it is technically possible, it will cause the database to get really large, really fast, and extracting images from a database is a big hassle.

In the Detail Section Print Event, it would be fairly easy to instantiate a recordset object and fetch the paths to the 12 images (assuming they're not in the query/table which is the basis of your report).

Good luck,
Tranman

Adam was not alone in the Garden of Eden, however,...much is due to Eve, the first woman, and Satan, the first consultant.
Mark Twain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top