473,387 Members | 1,779 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,387 software developers and data experts.

Show non-OLE image in report

Hi to all,

I am setting up a database which has to store a great number of
images. I will therefore store the images not as OLE but as a text
link to the file (maybe I'll try the BLOB-solution).
While it is no problem to show the image in a form with the .picture
property, I am trying to find a way to show the image on a report. So
far, I can only do this by the following code sequence:

stDocName = "Test_Report"

DoCmd.OpenReport stDocName, acDesign
Reports(stDocName)![Image1].Picture = "c:\temp1.bmp"
DoCmd.OpenReport stDocName, acPreview

I have to open the report first in design mode in order to set the
picture property.
The bad thing about this is that the user will get to the design of
the report when closing in the preview.

Does anybody know how to handle this or is there a different better
way?

Thanks in advance!

Uwe

Feb 5 '07 #1
1 2212
If the path-and-file-name of the image is stored in the Record, you should
simply be able to include in the Print event for the Detail Section:

Me.imgImageCtl.Picture = Me.txtImagePathAndFile

Note that because of the way Reports work, you'll need to have the image
path and file information in a Control in the Detail Section (which I have
called txtImagePathAndFile).

As you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' 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 happen when printing image intensive reports.

Larry Linson
Microsoft Access MVP

"urange" <ur****@gmx.dewrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
Hi to all,

I am setting up a database which has to store a great number of
images. I will therefore store the images not as OLE but as a text
link to the file (maybe I'll try the BLOB-solution).
While it is no problem to show the image in a form with the .picture
property, I am trying to find a way to show the image on a report. So
far, I can only do this by the following code sequence:

stDocName = "Test_Report"

DoCmd.OpenReport stDocName, acDesign
Reports(stDocName)![Image1].Picture = "c:\temp1.bmp"
DoCmd.OpenReport stDocName, acPreview

I have to open the report first in design mode in order to set the
picture property.
The bad thing about this is that the user will get to the design of
the report when closing in the preview.

Does anybody know how to handle this or is there a different better
way?

Thanks in advance!

Uwe

Feb 5 '07 #2

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

Similar topics

3
by: dp | last post by:
I am new to VB.NET and I have a simple question. How do I show a form from a command button click event? The code I have below is not working. I am trying to show the form frmAgent. What am I...
13
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
1
by: MSDousti | last post by:
Hi all, I have written a program, which uses some threads. I call thread t from the main thread, and then after some work t must show a modal window.(e.g. a messagebox) but because t is not the...
3
by: Nathan | last post by:
I read an earlier post from Gary and answered by Peter Huang concerning closing one form and showing another. I need to do the same thing in my application, but the code Peter gave didn't work for...
10
by: =?Utf-8?B?QWxiZXJ0IEZ1?= | last post by:
Hi, my function: myAdjustForm.Show(); I am using the Show method to show the pop-up window to the users in my C# program. I found that I have invoke this function TWICE at the beginning...
6
by: Norman | last post by:
Hello, I have a working Show / Hide form, that works on FF, but what I would like to do is to be able to display one part when a user clicks on one radio button and display another part when the...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
1
by: jej1216 | last post by:
Background: I have an PHP form that inserts data into a MySQL DB, and it works. Severity of Incident: <select name="severity" size="1"> <option value="">Select a Severity Option</option>...
5
by: Enij | last post by:
Hi All, If I type this code (VB.net 2003): Dim myDialog As frmTestDialog myDialog = New frmTestDialog myDialog.Show()
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.