Solved Report won't Print Multiple Pictures. (1 Viewer)

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 04:19
Joined
Apr 1, 2019
Messages
713
Hi,I have a report that includes a sub-report of photos, which can be scrolled through using the record nav buttons. I have a control on the form that contains the file path called [Attachment_Link] to the saved photos, then i set the image control Control source = [Attachment_Link]. Upon previewing the form, only the first photo is displayed. Any ideas? Appreciate it.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:19
Joined
May 7, 2009
Messages
19,175
is it a report or form?
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 04:19
Joined
Apr 1, 2019
Messages
713
Arnel, a report. Interestingly, another field on that same 'subreport', basically a description of the photo, prints for each record. Cheers
 
Last edited:

bastanu

AWF VIP
Local time
Today, 08:19
Joined
Apr 13, 2010
Messages
1,401
How big are the picture (file size)? I have found that working with anything over about 1-2 MB will overwhelm Access. And usually the bigger file size is not really needed for a picture embedded in an Access report (there are tools available that allow you to resize all pictures in a certain folder).

Another thing to try is to leave the image control unbound (set its Picture property to (none) and in the subreport's Detail section Format event add code to set it:
Me.ImageFrame1.Picture = Me.Attachment_Link ' the Attachment_Link textbox could be hidden

Cheers,
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 04:19
Joined
Apr 1, 2019
Messages
713
Vlad, will give it a go. The pictures are taken from my phone, can be 4mb with current phone camera resolution. The second photo does not display on a preview either. I'll save some examples at lower resolution and try too. Thanks for the prompt response.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 04:19
Joined
Apr 1, 2019
Messages
713
Vlad, that didn't work but I was able to preview & print multiple images when freshly linked & running on an alternate PC & printer (My home). I did find some code to reduce the size of the image though. Will give this a go. Thanks.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:19
Joined
Feb 28, 2001
Messages
27,003
If it works on one machine but not on another, it is time to try to find differences between them. The most common culprit is if you look (on both machines) to see when and to what version of Windows they were patched, ditto for Office updates. The next question would be whether your machine that has the problem is part of a domain that imposes strict group policies.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:19
Joined
May 7, 2009
Messages
19,175
what is Attachment_Link, is it a fieldname.
you Can only use the Image ControlSource to the Fieldname.
i don't know but i can view, Any size of picture with this setup.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 04:19
Joined
Apr 1, 2019
Messages
713
ArnelGP/The_Doc_Man, Yes 'Attachment_Link' is a fieldname. I refer to this as the control source of the image. This all works fine on a form. I have dramas when I attempt to print out (or view) a report where the last 'picture' is missing. Since posting this, I've installed a module that reduces the picture file source which can be 10mb down to about 1mb. It seems through my initial testing that that this works?
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 04:19
Joined
Apr 1, 2019
Messages
713
Gents, Seems to work now. I was able to view & print out multiple photos. Thanks.
 

aaronyoung914

New member
Local time
Today, 08:19
Joined
May 19, 2022
Messages
4
ArnelGP/The_Doc_Man, Yes 'Attachment_Link' is a fieldname. I refer to this as the control source of the image. This all works fine on a form. I have dramas when I attempt to print out (or view) a report where the last 'picture' is missing. Since posting this, I've installed a module that reduces the picture file source which can be 10mb down to about 1mb. It seems through my initial testing that that this works?
What module is that? I'm trying to get my images on my reports to print out reliably. Sometimes they don't show on the printed reports and I'm guessing it has something to do with filesize. Even when I add pauses in VBA code to allow the image to load, the image doesn't print reliably on reports.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 04:19
Joined
Apr 1, 2019
Messages
713
@aaronyoung914 , i use the image modules provided by Daniel Pinault of www.devhut.com. He has genorously provided modules for both rotating & resizing images. I resize then provide a button to rotate the image if required so that it's the right way up.
 

Users who are viewing this thread

Top Bottom