how to show pictures in a report.

  • Thread starter Thread starter Clement DeCastro
  • Start date Start date
C

Clement DeCastro

I created a table with pictures.

Insert Object
Create from file
Click the Link box (after I retrieve the file)

I create a report and all I get is the name of the picture in the picture
box (1232.jpg). How do I show my pictures in the reports? Any help is
appreciated. Thanks.
 
Clement DeCastro said:
I created a table with pictures.

Insert Object
Create from file
Click the Link box (after I retrieve the file)

I create a report and all I get is the name of the picture in the picture
box (1232.jpg). How do I show my pictures in the reports? Any help is
appreciated. Thanks.

You need to have an OLE server registered for that file type. If you open a
jpg from Windows Explorer, what program opens it? Is that program an OLE
server? Make sure it is an OLE server, and make sure it is registered (It
should be in the list of file types when you right click and choose Open
With)
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
I created a table with pictures.

Insert Object
Create from file
Click the Link box (after I retrieve the file)

I create a report and all I get is the name
of the picture in the picture box (1232.jpg).
How do I show my pictures in the reports?

When you use OLE Objects and Bound OLE Frames, you put yourself at the mercy
of the image processing application that is registered for that file type on
the user's system. There is also a Property on the Bound OLE Control, under
the Data tab on the Property Sheet, called "Display Type". If it is set to
"Icon", set it to "Content" -- but depending on the image processing app and
its settings, that still may not do what you want.

For examples of three approaches to handling images in Access, and an
article discussing considerations in choosing an approach, download the
sample databases from http://accdevel.tripod.com. If you are going to show
..JPG in Image controls in a Report, visit MVP Stephen Lebans site at
http://www.lebans.com/printfailures.htm
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.

This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson, Microsoft Access MVP
 
The quick answer, as Arvin pointed out, is to set up a suitable OLE Server application. The typical one
to use is MS Photo Editor. This may need to be installed from the Office CD if it's not already present,
and it must be associated with the relevant file types (and if necessary you must do this on each machine
that will run the application, and be careful not to install software that chooses to associate itself
with the relevant file-types).

However,

even though you choose 'link', a copy of the image will still be stored in the table, and not just a copy
but an uncompressed copy, i.e. anything from 5 to 100 *times* the size of the original file (for jpeg images).
This approach is therefore usually best avoided.

Instead, store the filename in a text field (or generate it from other data, eg an Id) and load the image
into an image control at runtime. This approach relies on the relevant office graphics filters being installed,
and there are a couple of workarounds that may be needed for the Access Image control (eg scroll-too-quick
crash, suppress 'Image Loading' dialog etc. See 'The Access Web' for more info on these.

A final alternative to consider is to use a 3rd party component, such as our own, designed to avoid all
these problems and offer enhanced functionality. For more info see the sig below.
 
Exponent said:
A final alternative to consider is to use a 3rd party component, such as our own, designed to avoid all
these problems and offer enhanced functionality. For more info see the sig below.
--
_______________________________________________________
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous

I have been testing this control, and so far I can say that it does
everything that's claimed of it. I haven't been able to test the Acquire
capabilities, so I can't comment on that as yet.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top