473,403 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

reports with images(the error in format or size?)

salamo alikom hi all
when i run report that includes image control linked to a field in the
table that contains the image path(on the server)and the record source
of the report contains over 30 records a messege shows saying:
"Microsoft Access doesn't support the format of the file'file
path\filename.jpg' or file is too large.Try converting the file to BMP
or GIF format".
I want to know which one is the problem (the size) or (the format is
not recognized).because solution for both is exactly the opposite
i.e.: converting the format to BMP or GIF enelarges the image size.
N.B.:
This message shows only when the report have large number of records
,but when i choose 5 records for example it doesn't show and images
shows normaly.
The code used is:
********************
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.image_path <> "" Then
Me.site_photo.Picture = Me.image_path
Else
Me.site_photo.Picture = ""
'MsgBox "This site doesn't have image"
End If
End Sub
*******************

thanks in advance hipe to recieve your reply soon.
Nov 12 '05 #1
3 5595
Here are some steps you must follow to eliminate/reduce the error you
are encountering.
Items #4 and #5 resolve this issue 90% of the time. :

1) Defrag your Hard drive. The temp printer output files Access
generates can be very large when they contain images.

2) Make sure the drive you point your Virtual Memory Manager to has
several hundred MB's of free space.

3) If you are still using Win9x then make sure you reboot before
printing.

4) You must turn off the "Loading Image" dialog via the Registry
solution here:
http://www.mvps.org/access/api/api0038.htm
If you are using NT or higher you will have to update both
HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER

5) Load the Images into the Image control from the Detail Section's
Print event NOT THE FORMAT EVENT.
If you follow the above steps and your Report still fails then here are
a couple of more solutions:

6) Upgrade to the latest version of Windows at the very least. Better
yet, upgrade to Access 2003 as well.
or
7) Use the PrintOUt method to only print out a limited number of pages
at a time. Repeat as required.
or
8) THis solution seems to look after most of the memory issues. At
runtime convert the Images to Bitmap format prior to loading them into
the Image control. Here is some sample code:
From: Stephen Lebans (St***********@mvps.org)
Subject: Re: Images in Reports
View: Complete Thread (18 articles)
Original Format
Newsgroups: microsoft.public.access.reports
Date: 2002-09-16 18:46:39 PST
Bruce I finally got a chance to test your method last night. It helped
but only with the actual printing and not the Print Preview itself.
I was able to print the failed Report directly to the printer or to a
disk printer file so that's great! Don't get me wrong, it's still a good
thing because at least you can print the report!

Unfortunately Acess still runs out of resources when you page back and
forth through Print Preview.
I plan to spend some time onthis issue shortly.
Here is the code I use to convert any Jpeg, Gif, or Metafile into a BMP.
Rather than using one of my API solutions I have cheated and set a
Reference to Standard OLE Types type library in order to get at the
SAVETODISK method. But no ActiveX controls are required
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Private ctr As Long

ctr = ctr + 1

Select Case ctr
Case 1
Me.Image10.Picture = CreateBitmapFile("C:\A.jpg")

Case 2
Me.Image10.Picture = CreateBitmapFile("C:\b.jpg")

Case 3
Me.Image10.Picture = CreateBitmapFile("C:\c.jpg")
ctr = 0

Case Else
ctr = 0

End Select

End Sub

Private Sub Report_Open(Cancel As Integer)
ctr = 0
End Sub
Private Function CreateBitmapFile(fname As String) As String

Dim obj As Object

Set obj = LoadPicture(fname)
If Not IsNull(obj) Then

SavePicture obj, "C:\SL11-52"
DoEvents
End If
CreateBitmapFile = "C:\SL11-52"
Set obj = Nothing

End Function

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"marwa mohamed" <ma*********@hotmail.com> wrote in message
news:76**************************@posting.google.c om...
salamo alikom hi all
when i run report that includes image control linked to a field in the
table that contains the image path(on the server)and the record source
of the report contains over 30 records a messege shows saying:
"Microsoft Access doesn't support the format of the file'file
path\filename.jpg' or file is too large.Try converting the file to BMP
or GIF format".
I want to know which one is the problem (the size) or (the format is
not recognized).because solution for both is exactly the opposite
i.e.: converting the format to BMP or GIF enelarges the image size.
N.B.:
This message shows only when the report have large number of records
,but when i choose 5 records for example it doesn't show and images
shows normaly.
The code used is:
********************
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.image_path <> "" Then
Me.site_photo.Picture = Me.image_path
Else
Me.site_photo.Picture = ""
'MsgBox "This site doesn't have image"
End If
End Sub
*******************

thanks in advance hipe to recieve your reply soon.


Nov 12 '05 #2
"Stephen Lebans" <Fo****************************************@linval id.com> wrote in message news:<UI**********************@ursa-nb00s0.nbnet.nb.ca>...

Stephen,

On your web site, you have a utility (ExportOLEtoJpegVer16) for
converting MS Access images to JPEG's. As this was written for Access
2000, what chg's. are necessary to use this tool in Access 2003?

Thx!
Nov 12 '05 #3
No changes are required. The code will work with A2K or higher.
:-)
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Steve" <sd**********@direcway.com> wrote in message
news:be**************************@posting.google.c om...
"Stephen Lebans" <Fo****************************************@linval id.com> wrote in
message news:<UI**********************@ursa-nb00s0.nbnet.nb.ca>...
Stephen,

On your web site, you have a utility (ExportOLEtoJpegVer16) for
converting MS Access images to JPEG's. As this was written for Access
2000, what chg's. are necessary to use this tool in Access 2003?

Thx!


Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DiskMan | last post by:
System: Redhat 7.2 Kernel-2.6.11.8 GCC-3.4.3 CCC-6.5.9 Binutils-2.15 Make-3.80 GTK/GLIB-2.6.7 For some reason my Linux box is suddenly having issues trying to read ;
2
by: Gvs | last post by:
Hi, I'm trying to compile an example semaphore .c file taken straight from the internet, but it won't compile with the error; gcc seminit.c -o seminit seminit.c: In function `main':...
0
by: CK | last post by:
There have been a few postings asking if there is an alternative to Crystal Reports for a web based web reporting solution. Access2PDF is the software solution for developers looking for an easy...
1
by: Tim Jones | last post by:
Hey all, I am trying to try get a crytal report running properly. A "Hello World" report that does not add criteria to the record selection formula of the report (either in the development tool,...
0
by: smart.bug | last post by:
hi, i have SQLserver properly running on my machine, when i open a project in VB.Net and add a SQLConnection object, while setting its connection string (when i click on combo box to choose data...
5
by: walsht | last post by:
When I compile the code snipets below I'm producing the error: storage size of 'frm' isn't known. dll.h : /* * File: dll.cpp * Defines the data link layer's interface. */ #ifndef __FRAME_
2
by: moishyyehuda | last post by:
Hi I am writing a script to upload images. How do I check the format of the file? How can I tell if the file is an image, movie, or text file? I would also like to put a limit on how much a user...
3
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I get a strange compile error when compile such simple program. Any ideas? foo.c: In function `main': foo.c:5: error: storage size of 'var' isn't known foo.c
4
manoj9849967222
by: manoj9849967222 | last post by:
Hi All I have designed a report & i want the report in PDF format Can i generate a report in .pdf format in aaccess. Can any one guide me to generate a report in PDF format. Please Help ...
0
by: jerry jensen | last post by:
I am using Visual Studio.net 2003. Ihave written a progra using a data base and crystal reports. All works well on my computer. When I deploy the program and run it on one of my other computer the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.