473,792 Members | 3,042 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

filling picture on report

Thanks anyone in advance... I have a product report that prints out
data about the product including a picture... at least that's what I
need to happen. On my report I have a linked Image with the two sets
of code that I've tried without any luck:

Note: on my form I have a TextBox named ImagePath that reads my image
path:
="\\MainServer\ data\companyInv entory\" & [Forms]![ProductForm]!
[ImagePathName] & "

on my report I've tried these two code blocks on the OnOpen event:

Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Pi cture = [Forms]![ProductForm]![ImagePath]
End Sub

and also:

Private Sub Report_Open(Can cel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Pi cture = [Forms]![ProductForm]![ImagePath]
End Sub

Any clues to the above or general "How To" on getting a Product Name
put into a textbox and the report reading the Product Name an getting
into the Report (?)

Thanks! Dav

Mar 5 '07 #1
3 1777
On Mar 4, 9:55 pm, "Parasyke" <kress1963no... @yahoo.comwrote :
Thanks anyone in advance... I have a product report that prints out
data about the product including a picture... at least that's what I
need to happen. On my report I have a linked Image with the two sets
of code that I've tried without any luck:

Note: on my form I have a TextBox named ImagePath that reads my image
path:
="\\MainServer\ data\companyInv entory\" & [Forms]![ProductForm]!
[ImagePathName] & "

on my report I've tried these two code blocks on the OnOpen event:

Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Pi cture = [Forms]![ProductForm]![ImagePath]
End Sub

and also:

Private Sub Report_Open(Can cel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Pi cture = [Forms]![ProductForm]![ImagePath]
End Sub

Any clues to the above or general "How To" on getting a Product Name
put into a textbox and the report reading the Product Name an getting
into the Report (?)

Thanks! Dav

You haven't indicated what is wrong. Are you getting an error message?
Image just not displaying?
="\\MainServer\ data\companyInv entory\" & [Forms]![ProductForm]!
[ImagePathName] & "
What is [ImagePathName]? Just file name or a longer path? Remove the &
" at the end.

Mar 5 '07 #2
On Mar 5, 8:42 am, "storrboy" <storr...@sympa tico.cawrote:
On Mar 4, 9:55 pm, "Parasyke" <kress1963no... @yahoo.comwrote :


Thanks anyone in advance... I have a product report that prints out
data about the product including a picture... at least that's what I
need to happen. On my report I have a linked Image with the two sets
of code that I've tried without any luck:
Note: on my form I have a TextBox named ImagePath that reads my image
path:
="\\MainServer\ data\companyInv entory\" & [Forms]![ProductForm]!
[ImagePathName] & "
on my report I've tried these two code blocks on the OnOpen event:
Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Pi cture = [Forms]![ProductForm]![ImagePath]
End Sub
and also:
Private Sub Report_Open(Can cel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Pi cture = [Forms]![ProductForm]![ImagePath]
End Sub
Any clues to the above or general "How To" on getting a Product Name
put into a textbox and the report reading the Product Name an getting
into the Report (?)
Thanks!Dav

You haven't indicated what is wrong. Are you getting an error message?
Image just not displaying?
="\\MainServer\ data\companyInv entory\" & [Forms]![ProductForm]!
[ImagePathName] & "

What is [ImagePathName]? Just file name or a longer path? Remove the &
" at the end.- Hide quoted text -

- Show quoted text -
Error states that it can't find the picture file and then takes me to
the debug screen in VB.
ImagePathName is the name of the textbox on the form.

Mar 5 '07 #3
On Mar 5, 1:55 pm, "Parasyke" <kress1963no... @yahoo.comwrote :
On Mar 5, 8:42 am, "storrboy" <storr...@sympa tico.cawrote:
On Mar 4, 9:55 pm, "Parasyke" <kress1963no... @yahoo.comwrote :
Thanks anyone in advance... I have a product report that prints out
data about the product including a picture... at least that's what I
need to happen. On my report I have a linked Image with the two sets
of code that I've tried without any luck:
Note: on my form I have a TextBox named ImagePath that reads my image
path:
="\\MainServer\ data\companyInv entory\" & [Forms]![ProductForm]!
[ImagePathName] & "
on my report I've tried these two code blocks on the OnOpen event:
Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Pi cture = [Forms]![ProductForm]![ImagePath]
End Sub
and also:
Private Sub Report_Open(Can cel As Integer, FormatCount As Integer)
On Eror Resume Next
Me!ImageItem.Pi cture = [Forms]![ProductForm]![ImagePath]
End Sub
Any clues to the above or general "How To" on getting a Product Name
put into a textbox and the report reading the Product Name an getting
into the Report (?)
Thanks!Dav
You haven't indicated what is wrong. Are you getting an error message?
Image just not displaying?
="\\MainServer\ data\companyInv entory\" & [Forms]![ProductForm]!
[ImagePathName] & "
What is [ImagePathName]? Just file name or a longer path? Remove the &
" at the end.- Hide quoted text -
- Show quoted text -

Error states that it can't find the picture file and then takes me to
the debug screen in VB.
ImagePathName is the name of the textbox on the form.

This tells me a couple things...

1) You don't have error trapping in the code. This is why the code
window opens in debug mode. You should add some so that when a file in
not accessible (and there are a lot of reasons in a network
environment). A more appropriate message is displayed and the users
aren't prompted to view the code that caused it.
2) The filepath is invaid. Either in spelling, the way you've spliced
them together, or access across the network is denied in some fashion.
At some point in the code before you try to apply the image to the
control, add a line...

Debug.Print [Forms]![ProductForm]![ImagePath]

and post the result to see if the formatting is correct. At the same
time, make sure this path is real and accessible on the network.

Mar 5 '07 #4

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

Similar topics

0
2257
by: Sandra Lambrechts | last post by:
We are using Crystal Report .Net to create our reports. We have inserted a picture on the Crystal Report, but when we export the report to a pdf-file to print the report, the quallity of our picture is very bad. We have already tried with jpg,with other resolutions,with an ole object but that doesn't resolve our problem. How can we put a picture on our crystal report, without losing quality when exporting to pdf? Thank you very much...
2
13455
by: Sam | last post by:
Hello everyone, I have a table, which contains a picture column, I put URL info into it. "www.myweb.com/1.jpg..." I want to show this picture in my crystal report, I find some samples show the "static" picture in Crystal report, No "Dynamic" one. Can Crystal Report do that? Thanks in advance. Sam
1
1256
by: Filips Benoit | last post by:
Dear All, I want a report for a list of products with its picture on the leftsite of the Productname and the P-price. So 3 controls in the detail-section: image (unbound, hight=5cm), P-name and P-price (bound) I have put the code in the Details_Print event to bound the image-controle. image.picture = Path & "\" & Product-name.gif This works fine.
2
1823
by: Regnab | last post by:
I've got a YES/NO section of a report I'm making. Depending on certain values, I want to circle either YES or NO. I've got the code working so it'll show or hide the circle, but I can't seem to get the circle (which I drew in Adobe Photoshop because I want the handwriting look) to be transparent (ie show the Yes or the No in the middle of it). I've tried right clicking and setting background to transparent but still no luck. The thing...
6
8192
by: Salad | last post by:
Hi: I have a Bill of Lading template from the printer that I saved as a BMP. I created a new report and in the report's picture property told it the BMP file name. It brought the image in just fine. I then placed the fields in the report. Then I previewed the report. The picture resized or something and all of my nice fields were no longer in the same position. It didn't make any difference if I selected Crop, Zoom, or...
1
1747
by: Amr Moselhy | last post by:
Hi Everyone i m trying to create a crystal report that contains a picture and this picture differs according to certain database information . the name of the picture to be included in the report comes from the database. the problem is that the picture can be added only in the design time , changing the name of the file in the run time doesnot change the contents of the picture . it seems that the contents of the graphic object is included...
4
12853
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property, which becomes invalid when the user installs the database (ie: c:\devpath\ becomes c:\program files\mydbapp, but the .Picture property still points to c:\devpath\) The problem is that I don't *know* what installation path the user will select,...
3
1827
by: Parasyke | last post by:
I have a form that has a bound textbox displaying a picture path (in another folder) for an image (e.g. C:\Documents and Settings\My Documents\My Pictures\SymbolVRC 6940.jpg). I need this actual picture to display on the screen and most importantly to display on a report. Any clues on this? Thanks!
1
2860
by: davidwelli | last post by:
Hello, I have a Access 200 format database that contains contact details and a picture for each record. The contact details are held in one table and the images are held in another as OLE Objects. This database is used to produce passes. I want to export one record from the dartabase including the picture into a format that can be easily tansferred by email. I've created a query based on the two tables that will retreive all the...
0
9670
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
10430
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...
1
10159
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,...
1
7538
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
6776
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
5436
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
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4111
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
2
3719
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.