473,626 Members | 3,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Repor t"

DoCmd.OpenRepor t stDocName, acDesign
Reports(stDocNa me)![Image1].Picture = "c:\temp1.b mp"
DoCmd.OpenRepor t 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 2222
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.txtImagePath AndFile

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 txtImagePathAnd File).

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.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 happen when printing image intensive reports.

Larry Linson
Microsoft Access MVP

"urange" <ur****@gmx.dew rote in message
news:11******** **************@ j27g2000cwj.goo glegroups.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_Repor t"

DoCmd.OpenRepor t stDocName, acDesign
Reports(stDocNa me)![Image1].Picture = "c:\temp1.b mp"
DoCmd.OpenRepor t 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
6712
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 missing? Private Sub cmdNewAgent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNewAgent.Click Dim frm1 As New frmAgent() frm1.Show() Me.Hide() End Sub
13
74052
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 Form1.Visible = False Load (Form1)
1
2685
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 main thread, the window appears non-Modal. Is it possible to show a modal form, from within another thread? thnx in advance.
3
2242
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 me. Maybe Peter or someone else can help me out. I changed the startup object to Sub Main, created a new module and inserted this code: Imports System.Windows.Forms
10
2436
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 before I can see the pop-up window poping up.
6
4188
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 user clicks on the second radio button - here is the code which just shows / hides the whole form: <script type="text/javascript"> <!-- var dl_elements = new Array('dl_address_country',
39
5848
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 ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
1
1513
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> <option value="Level1 - No Obvious Harm">Level 1 - No Obvious Harm</option> <option value="Level2 - Non-permanent Harm">Level 2 - Non-permanent Harm</option> <option value="Level3 - Semi-permanent Harm">Level 3 - Semi-permanent Harm</option> <option...
5
3597
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
8265
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
8196
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
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
8637
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...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7193
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1511
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.