Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture in my report 34

Status
Not open for further replies.

strantheman

Programmer
Mar 12, 2001
333
US
Ive searched all of the Access forums, and I haven't found a solution that works. This seems like a very common procedure so im sure someone out there can help.

My ITEM table looks like this:

name | imagepath
-----------------------------------------------
Linksys Cable/DSL Router | d:\lsBEFSR41.jpg
Netgear Switch | d:\ngFS105.jpg

Name is the name of the product, and imagepath is where the photo is stored on my drive. My report pulls NAME, IMAGEPATH from ITEM table for the specified ID. I want to show the name of the product, and its corresponding picture on my report.

For this discussion, lets say the two objects on my report are named itemName and itemImage. I would assume this is as simple as setting some property of itemImage to the IMAGEPATH field, but ive been unable to figure this out. Please provide any help that you can. Id be willing to receive an email with a sample MDB file if thats what I have to do.

thanks in advance, im really hurtin here.
 
Hi everybody,
I have a project where I need to create a report-catalog with over 60,000 products.
Products (cable assemblies) are groupped by type and each group of 10-16 products has the same picture.
On each page I should have:
a header with the information about each group (picture can be here),
detail section with 2 column table with prod info/prices (picture also can be on above the table),
and a footer

Thanks to Bob, I have managed to display linked images for each product.
Now I have to figure out the best way to display one picture per group and product specs in 2-3 columns.
I have tried 2 column label reports.
The problem is that the footer doesn't go through the whole width of the page. The header is working fine on the other hand...?
Is there a property or something for regular reports that would allow displaying records in columns?

Thanks
Way
 
If I follow you posting correctly you want more than one record to be posted on on Detail section row? If that is correct a way to do this is to split your data into two queries with a calculated field for the two records that corresponds to each other. Then take these two queries in together with an INNER JOIN so that both records for the two seperate queries are now available to be printed on a single detail section row.

I hope I didn't confuse with this explanation. Let me know if I can help you better understand.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
way2many: In response to your question, I would try to come up with a naming convention for my pictures to uniquely identify each using a record ID and the section(1-7) and placement( 1 or 2).

Example:
record ID = A1234 Section 1 Placement 1 A123411.jpg

Now name and place all of your pictures in the same folder on the server or your computer and you can identify that through a CONST statement in the Reports Declaration section.

Code:
Const vPath = "C:\ACCESS\"

Now using the techniques for assigning a path and file name to the .Picture property you can use the Record ID Section and placement number(left = 1 right = 2) to create the file name. Now cancatenate this with vPath and you have the entire path to the file to display.

I hope you understand this. If not come back with questions.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Thank you so much Bob,
I kinda got it, I think.

Would you explain to me what is the difference between regular report and labels report?
What makes columns on labels reports?

Way
 
Bob,
I think that there is a bit of confusion between realflava's question and mine.
1. I don't have 7 sections on my report
2. My picture file names are generated from ProdType+cblID+".gif"

Did you post your last answer to realflava's question or mine?..
Thanks,
Way
 
Sorry about that. The last posting with the reference to 7 reporting sections was directed a realflava.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Bob, is it possible to have the picture only visiable when you click on command button or enlarged when clicked?
 
Sure you can manipulate the visible property with a command button click or don't even load it until you click the button. Both work fine depending upon the effect that you want. If you wanted to enlarge it on double-click you can also change the height, width, top, and left properties. This is all done in "TWIPS". Yes, you heard me. Funny named term but it stands for 1/1440" . So if you want to move the left edge 1/2 inch you must subtract 720 from the Left property even though the left property is showing inches when viewed in the property window. If the left property is 3" then it is 3*1440 or 4320 twips from the left edge of the form. Hope that this helps.

Good luck with you project.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
scriverb,

I was in need of the ability to display a dynamic picture on a form and used your directions - it worked great. Thanks for the tip. I have one problem that I could use some help on though. My problem is that I need a way to trap for no path being listed to avoid a run-time error that I get when there is not a path present - such as when entering a new record. I need something like this, but not sure how to word it:

If me![ImagePath] = " " (Null) Then
Show some text that says "Picture Not Available"
Else
me![PictureImage].picture = me![ImagePath]
End If

I wasn't sure how to get the text in the picture box; I didn't think a picture box will allow text. Any suggestions on how to do this?

coachdan32

 
The way that I handle this is create a picture.jpg in your folder. Set the default value for the new record to that path and file name. Now this picture would say "No Picture Available" or something appropriate. New records with no picture would be setup to see this because the default is set to this default picture. Your program would allow for the changes to this pointer and the appropriate picture for the item would be displayed in those cases.

No real need for any coding to be added here.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Dan: Our minds must be running in parallel this morning.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Thanks CoachDan. It is appreciated. Post back with any other questions. This thread is surely trying to address all of the picture in form and report issues.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
It keeps me sharp solving problems all day long. I also really enjoy helping other programmers solve the mysteries of ACCESS.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Hey, you're the guy that started all of this. This has been a really interesting thread. When you posted it I hadn't even tried linking the pics so all of these ideas are a results of just digging in a trying different things. Seems like everyone likes the idea though. It's been educational for all of us.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Yes and im proud to say the City of Shasta Lake Historical Society is still using my little db. Thanks much. hehe
 
Wow! What a wonderful thread!

I've gotten everything to work using it but am stumped on one thing.

It there a command button that can be used to have the a user choose the relative path of the picture to display?


jacque

Just knowlegeable enough to cause problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top