473,795 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Images As External Files

Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin
Nov 13 '05 #1
6 2227
Image controls work for me in reports. I load the path and filename into the
Picture property in the Print event. In reports, to avoid memory leakage,
you should also see MVP Stephen Lebans'
http://www.lebans.com/printfailures.htm. PrintFailure.zi p 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
"Kevin" <kz*******@marc ct.org> wrote in message
news:6b******** *************** ***@posting.goo gle.com...
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin

Nov 13 '05 #2
How do you do it on the form? The way I do it on my forms is a form_current
event.
me.imgname.pict ure = me.txtPicturePa th
for my reports i write the same code just i put it in the Detail_Format
event.
let me know if this helped.
Chaim B.
kz*******@marcc t.org (Kevin) wrote in message news:<6b******* *************** ****@posting.go ogle.com>...
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin

Nov 13 '05 #3
Chaim,

I have tried your expression with no luck - do you have a sample
database that works?

Kevin

ch****@gmail.co m (Chaim B.) wrote in message news:<24******* *************** ****@posting.go ogle.com>...
How do you do it on the form? The way I do it on my forms is a form_current
event.
me.imgname.pict ure = me.txtPicturePa th
for my reports i write the same code just i put it in the Detail_Format
event.
let me know if this helped.
Chaim B.
kz*******@marcc t.org (Kevin) wrote in message news:<6b******* *************** ****@posting.go ogle.com>...
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin

Nov 13 '05 #4
Larry,

I have put this code into the open event of the
report:Me![imgTheImage].Picture = Me![txtImagePathAnd File]

When I run the report I get an error message - runtime error 13 - Type
mismatch.

How can I fix this?

Thanks
Kevin

"Larry Linson" <bo*****@localh ost.not> wrote in message news:<OA7pd.763 6$0k1.1375@trnd dc08>...
Image controls work for me in reports. I load the path and filename into the
Picture property in the Print event. In reports, to avoid memory leakage,
you should also see MVP Stephen Lebans'
http://www.lebans.com/printfailures.htm. PrintFailure.zi p 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
"Kevin" <kz*******@marc ct.org> wrote in message
news:6b******** *************** ***@posting.goo gle.com...
Hi,

Does anyone know how to display external files (i.e. jpg files) in
reports? I have stored the file location in a table and am looking
for a control to display it in a report. I can display the photo in a
form but the same control does not work in the report. I have based
my tables and control off of Larry Linson, Imaging in Access example
database. (Awesome resource!)

Please help.
Thanks.
Kevin

Nov 13 '05 #5
I use a hyperlinked text or button to access photos for my database. I
save the record as a unique value of some sort and use that value to
name the images. This way you can change the hyperlink as needed for
each record when you view the record.

Nov 13 '05 #6
"Kevin" <kz*******@marc ct.org> wrote
I have put this code into the open
event of the report:
Me![imgTheImage].Picture = Me![txtImagePathAnd File]

When I run the report I get an error message -
runtime error 13 - Type mismatch.


Why did you choose the Open event? The only events to consider for this
purpose are the Format and Print events of the Report Section containing the
Image control. Nothing is actually displayed at the time of a Report's Open
event (which fires but once for a Report) and, if I remember correctly, no
Record is "current" at Open time.

I use the Print event for efficiency, because the Format event may fire more
than once for each Record. Print, AFAIK, only fires once when the Record is
displayed (the same record may be displayed more than once if you are in
Preview and page back and forth -- and Print will fire each time it
displays).

Larry Linson
Microsoft Access MVP
Nov 13 '05 #7

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

Similar topics

0
1529
by: Hans-Joachim Widmaier | last post by:
Hi, I have a class that reads most common files (text, images, tar archives, zip archives). I just read in the whole thing and decide then what to do with it - create a gtk.TextView, gdk.pixbuf, or tables-of-contents, whatever. Looking at the functions in the appropriate modules shows that most of them want to read from external files. Some take file-like objects, others don't. And tarfile allows it for gzip compressed archives, but not...
0
793
by: David Helgason | last post by:
I think those best practices threads are a treat to follow (might even consider archiving some of them in a sort of best-practices faq), so here's one more. In coding an game asset server I want to keep a large number of file revisions of varying sizes (1Kb-50Mb) inside the database. Naturally I want to avoid having to allocate whole buffers of 50Mb too often.
4
2349
by: planetthoughtful | last post by:
Hi All, Just wondering if anyone can tell me if it's possible to programatically save Access2003 code (ie code behind forms, as well as class modules) to external files? I'd like to use versioning software to keep track of code changes, but this would require being able to save the files easily to *.cls and *.bas files.
1
3346
by: MaxWall | last post by:
Hi Everyone, I'm new to the forum and to the Actionscripting world. I need some help with a project I'm working on and would appreciate any guidance. I'm working on a flash app for CD-ROM development. I'm trying to save a file from an external directory on the CD-ROM to the desktop. Is there a way to do this using the fscommand or LPFlashEx? Or something else? I've been doing some research on the latter and am trying to figure out where...
4
1592
by: Kanuk | last post by:
I know there has to be a way to do this I want to beable to store and input data from a txt file and then beable to load it and parce it into visual basic to be thrown into a 1,2,or 3 dimentinal array I used to beable to know how to do this.. but its been a while since i have done any coding I dont know if this will help but if any of you used to use qbasic.. there was a function that let you list data at the bottem of the program and...
5
16364
by: bhodgins | last post by:
Hi, I am new on here, and had a newbie question that I am stumped with. I am not new to access, but am new to VB. I am trying to export BLOBs from a field called photo to external jpeg files. I have tried the MS kb 210486 and successfully got the import/export to work with a sample table, but only the first record. I do not wish to impost binary data to the database, it's already there. I simply wish to pick up the binary BLOB from the photo...
7
4515
by: Patricia Mindanao | last post by:
I have a directory tree on my hard disc which represents all the web pages and linked stuff on my mirrored web hoster server. All web pages and files are statically linked. So dynamically composed links e.g. with javascript do not matter here. Now I want to find out which of all these (many) files are un-reference orphans starting from the main page index.html (or index.shtml) In other words if e.g. a file aaa.log can not be...
0
1517
TjFL
by: TjFL | last post by:
I have a form where specific external files are selected by the user depending on needs. Each item listed on the form has 4 Yes/No boxes next to it where they select what they want. The result will be multiple items having multiple files selected. I want to be able to then hit a command button and print the selected files. They consist of docs and pdfs which have hyperlinks saved in corresponding fields for each category. I'm at a loss...
3
1296
by: Gubby | last post by:
Hi all. I'm a fairly basic HTML worker, don't know any other language. This is my site: www.andrewgubb.com. A simple text-and-images site, like a blog I suppose except that I'm having more fun doing it just HTML. This is a detail I've found when building my site. There are elements of all the pages which are common to each, but which I have to change every so often. Opening every single file and copying and pasting the changes is a massive...
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10437
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.