UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Report Image Control Works For Some But Not Other Image Files, Access 2016    
 
   
tobyhanna
post Aug 29 2019, 01:20 PM
Post#1



Posts: 156
Joined: 7-February 06



Hello,

I developed a simple employee database to produce a printed directory using Access with a FE/BE setup.

The data entry form and the report include an image control to display each employee's image.

The employee table contains a ShortText field for the file name associated with each employee.

Seems simple. It of course works fine with my setup. However, the client reports about 1/3 of the photos do not show up on the report. They appear on the form on screen but not in the report preview. I had the client send me a few examples of the images that do not work on their setup. And of course they work for me.

The client can find and view the images in File Explorer. I've seen screen shots of images displayed in the form but not in the report preview. This is for only some photos. The "missing" photos are of random size, meaning some are smaller some are larger.

I had the client save a photo as a smaller size, rename a photo and reconnect on the employee form, and make sure the software is up to date as specified in this article: from Microsoft

Still, nothing has "fixed" this issue of some images work, others do not.

I developed the Access program using Microsoft Office 365. My Account page states Version 1908 (Build 11929.20254 Click-to-Run) as the version. The client Account page states Microsoft Office Professional Plus 2016 as the version. Could this be an issue?

Has anyone experienced this issue?

Thank you,
Liesl
Go to the top of the page
 
theDBguy
post Aug 29 2019, 01:24 PM
Post#2


Access Wiki and Forums Moderator
Posts: 76,381
Joined: 19-June 07
From: SunnySandyEggo


Hi Liesl. For those records where the image doesn't display in Print Preview, do they show up on paper if they print the report anyway?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
tobyhanna
post Aug 29 2019, 09:01 PM
Post#3



Posts: 156
Joined: 7-February 06



Hi DBGuy,

Thank you for your reply.

All images appear on-screen in the form.
Several images are "missing" from the report print preview mode.
When report print preview is changed to report view (right-click over print preview and select report view), all images appear.
Export to PDF, many images "missing".
Printed PDF, many images "missing".

I suppose something is not right in either my report or the preview mode. And I can ask if printing the report view if the images appear, I don't know that answer.

Thanks,
Liesl
Go to the top of the page
 
theDBguy
post Aug 29 2019, 09:10 PM
Post#4


Access Wiki and Forums Moderator
Posts: 76,381
Joined: 19-June 07
From: SunnySandyEggo


Hi Liesl. Do you know if you're using any code to manipulate the images on the report?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
tobyhanna
post Aug 30 2019, 09:16 AM
Post#5



Posts: 156
Joined: 7-February 06



Hi DBguy,

There is no code on the report. The image control has field name assigned as the control source which contains the path and file name of the image.

This is the code in the main form OnClick for the button to open the report in preview mode:
CODE
=OpenReport("rptDirectory")

OpenReport() is a function which has one line of code besides the error trapping,
CODE
DoCmd.OpenReport sReport, acViewPreview


This is the code in the main form OnClick for the button to produce the PDF file:
CODE
=CreatePDF("rptDirectory")

CreatePDF() is a function which has one line of code besides the error trapping,
CODE
DoCmd.OutputTo acOutputReport, sReport, acFormatPDF


The client states: In report preview mode, not all images appear and are scrambled. However, in report view mode, all the images are there and are clear. Again, this does not happen on my computer, I see all images. I have an inquiry out to define "scrambled".

I had the report image control size mode set to zoom. I may have changed this while trying to trouble shoot this issue early on. I'm going to try clip as the report image size mode.

Why would images behave different in the print preview view than in the report view?

And is there something I am missing about the PDF export? I just tried to export to PDF from the print preview which works and also from the report view but the export option is not available in report view. Or perhaps my PDF driver is different than the client's, is that a possibility?

Thanks so much for all you advice,
Liesl
Go to the top of the page
 
theDBguy
post Aug 30 2019, 09:43 AM
Post#6


Access Wiki and Forums Moderator
Posts: 76,381
Joined: 19-June 07
From: SunnySandyEggo


Hi Liesl,
QUOTE
Why would images behave different in the print preview view than in the report view?
There is no reason I can think of, if there are no code doing it.

QUOTE
And is there something I am missing about the PDF export? I just tried to export to PDF from the print preview which works and also from the report view but the export option is not available in report view. Or perhaps my PDF driver is different than the client's, is that a possibility?
Yes, I was going to say earlier, the reason why I asked if the images show up by actually printing the report on paper is because of the printer driver. So, with regards to the PDF driver, you could be using the Acrobat version of the driver while the client is using the Microsoft version of it, which could have some differences.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
tobyhanna
post Aug 30 2019, 10:01 AM
Post#7



Posts: 156
Joined: 7-February 06



Hi DBguy,

QUOTE
So, with regards to the PDF driver, you could be using the Acrobat version of the driver while the client is using the Microsoft version of it, which could have some differences.

Or visa versa.

Thank you, I'll try that angle and let you know. Enjoy your weekend,
Liesl
Go to the top of the page
 
isladogs
post Aug 30 2019, 03:21 PM
Post#8


UtterAccess VIP
Posts: 1,684
Joined: 4-June 18
From: Somerset, UK


Is there any common pattern to which files are visible and those that aren't.
For example, PNG files visible but JPG files aren't

--------------------
Go to the top of the page
 
PhilS
post Aug 31 2019, 05:02 AM
Post#9



Posts: 624
Joined: 26-May 15
From: The middle of Germany


My guess, from own experience with the same symptoms:

I’m pretty sure the cause of this problem is some memory leak in the Access reporting engine. It is not individual images causing the problem. Rather it is a sequence of images in a certain section of the report. The first couple of images fill up some kind of memory buffer, then there is an image that needs too much memory to be processed and it doesn’t show. There might be images later in that sequence that need less memory and do show again. If you change the order of images, other images will be affected. After a group level change in the report that memory buffer is reset, and images will show again until the buffer is once again filled up.

Our workaround to the problem was to generate Thumbnail sized images for the report and show those instead of the original ones. – This works great in our application but might not applicable in other circumstances.

There also was a thread on UA recently (in the last 12 months) dealing with the same kind of problem. – I can’t remember its conclusion and I’m too lazy to dig it up.

--------------------
Go to the top of the page
 
arnelgp
post Aug 31 2019, 07:05 AM
Post#10



Posts: 1,427
Joined: 2-April 09
From: somewhere out there...


did you set the ControlSource of the Image control to the fieldname
on your table that holds the path+filename of your images.

if you are just setting it through code, that won't work.

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
tobyhanna
post Sep 3 2019, 12:51 PM
Post#11



Posts: 156
Joined: 7-February 06



Thank you all for your replies.

Colin, All files are JPG files, some over 1KB, some under. I have not been able to detect any pattern.

PhilS, I had the client try saving the images as smaller files but that did not work. I can suggest all the images be thumbnail size images and search some more, but I was not able to find anything in prior searches.

Arnelgp, I set the ControlSource of the Image control to the fieldname in the underlying query that holds the path+filename of the image. One post I found suggested using this code in the Detail_Format of the report so I added it but there was no change. imgPhoto is the Image control. PhotoLocation is the fieldname with path+filename.
CODE
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.imgPhoto.Picture = IIf(FileExists(Me.PhotoLocation), Me.PhotoLocation, "")
End Sub


DBguy, The client tried to print the preview of the report to "Microsoft Print to PDF", which I believe is the driver used in my setup and still no luck. But if the photos are not displaying on the preview, I suppose that was expected.

Thank you all,
Liesl
Go to the top of the page
 
June7
post Sep 3 2019, 01:54 PM
Post#12



Posts: 867
Joined: 25-January 16



Has client tried running from a different computer with same and different printer? Are they on a network? Are you?


This post has been edited by June7: Sep 3 2019, 01:57 PM

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page
 
tobyhanna
post Sep 5 2019, 08:27 AM
Post#13



Posts: 156
Joined: 7-February 06



Hello,

Client ran database on a different computer with same results. I obtained all the photo files and now also have the same results, missing photos on the print preview mode of the report. The missing files are larger in size, over 3MB. I suggested smaller files, I was told the same results, missing photos on the print preview. The smaller files included for my testing were not of the right format so I'm waiting for additional testing material - smaller photo files.

Can I somehow slow the processing of the report so it includes all the photos? I thought keeping the photos out of the attachment field type was best practice but this simple database has proven to be otherwise.

Thanks again for all your much appreciated advice,
Liesl
Go to the top of the page
 
June7
post Sep 5 2019, 03:06 PM
Post#14



Posts: 867
Joined: 25-January 16



Cannot replicate this issue. I have a report that pulls 206 external jpg images averaging about 1mb ea. The report opens slowly but all images display.

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page
 
PhilS
post Sep 6 2019, 04:16 AM
Post#15



Posts: 624
Joined: 26-May 15
From: The middle of Germany


QUOTE
Can I somehow slow the processing of the report so it includes all the photos? I thought keeping the photos out of the attachment field type was best practice but this simple database has proven to be otherwise.

I think "slowing down the processing" is neither possible not would it solve the problem.

A best practice usually will minimize problems, but not to eliminate all problems. In that regard this issue does not prove anything. Provided my assessment of the problem is correct, it would happen all the same if the images were stored as attachments. - You now have a scenario to reproduce of the issue. So, you can easily check for yourself if this makes any difference.


QUOTE
Cannot replicate this issue. I have a report that pulls 206 external jpg images averaging about 1mb ea. The report opens slowly but all images display.

I believe, for the bug I described to appear, the images need to be in the very same section of the report, e.g. in the same group if you use grouping.


BTW: I took the time to dig up the other thread I was referring to: Some Pics Aren't Printing In Report, Access 2016
In that thread the resolution was to reduce the image size, which is in line with out internal solution to the problem; creating thumbnails of the images for the report.
This post has been edited by PhilS: Sep 6 2019, 04:18 AM

--------------------
Go to the top of the page
 
June7
post Sep 6 2019, 01:18 PM
Post#16



Posts: 867
Joined: 25-January 16



Have two reports for same images, one with grouping and one without. Images are all in same section. All images display in both reports.

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page
 
tobyhanna
post Sep 17 2019, 03:35 PM
Post#17



Posts: 156
Joined: 7-February 06



Thank you all for your help. The issue was resolved when the client made all the photos under 99KB in size.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    15th October 2019 - 09:31 PM