Problem about view pictures in Report

history

Egyptian Pharaoh
Local time
Today, 09:15
Joined
Jan 26, 2008
Messages
190
Hello Friends,

I've a database, and created a form (based on a table) to view my employees pictures ....
and when I tried to creat a report (based on the same table) to view and print the employees info, the report didn't work but when I made a new table and based the report on it .... "it works very well"

why??????
Please help me because by this I have to enter the data two times, one for the form and one for the report where there is two tables ....

waiting you guys
 
i know this is a very delayed response, and i hope you've figured it out by now: but why not create a new form based on the same table that the report is based on!? then you can also scrap the 'form table'. in effect, you will have one table, and this will be the data store for the data you enter in the form and the data that is then put into the report.
 
The best way to handle images in a report is to have an Image SubReport.

I know with older versions of Access you will need to make the Image control invisible if the Image is not found as Access had a bad habit of reiterating the image until a new image came along!

Simon
 
I know with older versions of Access you will need to make the Image control invisible if the Image is not found as Access had a bad habit of reiterating the image until a new image came along!

that's a great tip - i'm using 2007 and i find access is still handling this imperfectly. when i preview a filtered report, it handles multiple images fine, but when i open the report outright (without any filters) it reiterates the first record's image in any following 'empty' image controls.

i'm gonna try your suggestion, simon! thanks!
 
For some reason, I desisted with an Image Control on the actual report and used a SubReport instead.

Two step approach to the referencing the image file.

1) The Path
2) The File name.

This way you can have differring paths depending on your environment, whilst the File name may not change the Path may. The Path could be on a server or local PC depending on circumstance.

I have some scripts, if you need them, just ask.

Simon
 
but even with strFilePath and strFileName, you still need an image control to DISPLAY the image.

i pretty much ONLY use strFilePath and strFilename (b/c my DBs CAN and DO move around) and i like to make sure the images go with (they are always in a subfolder)

i have even one database where the user can chose to add an image from ANYWHERE on their computer, and once they do, i've made code to copy that image to my DB subfolder and rename with an appropriate filename to the record and reference it from there, so that the DB is independant of users accidentally deleting, moving or renaming their images.

but references to images are ALWAYS (in my DBs) via a relative path, and ALWAYS displayed using an image control...
 
Last edited:
I agree, if you put the Image control on a SubReport that deals with the Image in isolation and the rest of the parent Report doesn't have to include fields to introduce the image. In other words your [parent] queries can be completely barren of any reference to an image and concentrate on presenting the data whilst the SubReport handles the image.

Simon
 

Users who are viewing this thread

Back
Top Bottom