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

Images

Hey,

I currently have images in records linked to my database which print
out on a report. Each of the images is a different size. What i would
like to be able to do is have the image control grow and shrink
depending on the size image, so more records can fit in the page. Is
there any way to do this?

Thanks for your help.

Christina

Jun 21 '06 #1
7 2567
The standard Access Image Control maintains its designed size; if your image
is not the same size it allows you to select in the SizeMode Property to
display only part of your image (Clip), to fill the Image Control even if it
distorts the image (Stretch), or to display the image as large as possible
within the Image Control while maintaining the aspect ratio of height to
width (Zoom).

I must admit that I have never tried using "Can Grow" with an Image
Control -- I am not at all sure what that would do with an image from my
camera that defaults to 22" in its largest dimension. I have also never
found a reasonable need for "Clip" or "Stretch" mode.

Larry Linson
Microsoft Access MVP

<ch*******@hotmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
Hey,

I currently have images in records linked to my database which print
out on a report. Each of the images is a different size. What i would
like to be able to do is have the image control grow and shrink
depending on the size image, so more records can fit in the page. Is
there any way to do this?

Thanks for your help.

Christina

Jun 21 '06 #2
Thanks Larry,

If i create another field, in the table with the images, which has the
dimensions of each image, is there any code i can write in the report
to change the size of the image control based on the dimensions of the
image?

I really apprieciate your help!!

Christina

Jun 21 '06 #3
<ch*******@hotmail.com> wrote
If i create another field, in the table with
the images, which has the dimensions of
each image, is there any code i can write
in the report to change the size of the
image control based on the dimensions
of the image?


The Controls do have a Height and Width Property, so you can try. I didn't
have much luck with some previous experimentation on sizing Controls and the
Section in which they resided, for different purposes. Your mileage may
vary.

Larry Linson
Microsoft Access MVP
Jun 21 '06 #4
Hey Larry,

I've put the following code into the 'On Format' event in the 'Detail'
section of the report.

imgPicture.Height = imgPicture.ImageHeight
imgPicture.width = imgPicture.ImageWidth

What happens is that it checks the dimensions of the first image and
uses that size control for all the images regardless of the size. Do
you have any suggestions on how to improve it?

Thanks,

Christina

Jun 22 '06 #5
<ch*******@hotmail.com> wrote
I've put the following code into the
'On Format' event in the 'Detail'
section of the report.

imgPicture.Height = imgPicture.ImageHeight
imgPicture.width = imgPicture.ImageWidth

What happens is that it checks the dimensions
of the first image and uses that size control
for all the images regardless of the size. Do
you have any suggestions on how to improve it?


For a quick test, I modified the experimental report that I had done to test
resetting the Detail Section height. It was based on the Northwind.MDB
Categories Table, which has imbedded OLE Object Pictures. I was able to
expand and contract the height of a Bound OLE Frame with the Pictures
inside. I made corresponding changes to the height of the Detail Section,
which worked, also.

I'd expect if changing height and width worked for a Bound OLE Frame, that
it would also work for an Image Control -- but what i expect doesn't always
prove true.

It is possible, perhaps, that the "ImageHeight" and "ImageWidth" properties
are affected by the Control's "Height" and "Width" properties, so may not be
a good choice for this purpose.

Just remember that Height and Width for Reports are in units of "twips", or
1/1,440th of an inch, so if you are storing picture height and width in
inches, multiply by 1440 before using to manipulate controls.

Larry Linson
Microsoft Access MVP
Jun 22 '06 #6
Thanks so much Larry!

I've finally got the image to work!!!! Now i can't get the report to
print a group of records on one page and force the next group onto
another page!!!!

I really appreciate all the help and perseverance.

Christina

Jun 23 '06 #7
<ch*******@hotmail.com> wrote
I've finally got the image to work!!!!
Congratulations!
Now i can't get the report to print a
group of records on one page and
force the next group onto
another page!!!!


That'll have to do with the group's KeepTogether and ForceNewPage
properties. Those can be tricky, so you'll have to experiment; if you are
lucky, what seems intuitive will work the first time. <G>

Larry Linson
Microsoft Access MVP
Jun 24 '06 #8

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

Similar topics

7
by: Wayne | last post by:
I have a script that uses filesystemobject that reads files from a given path, in my case images. It is running on a server that is 2000 adv svr w/ all current patches. The script prior to some...
3
by: Simon | last post by:
This problem has been driving me mad for months.... Seen a few posts on forums about it but no answers... No mention on MSDN etc. XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
10
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images....
6
by: wattanabi | last post by:
Greetings, I'm attempting to layout a bunch of images in a grid using DIV's instead of a table. I currently have a 3x6 table that I need to convert to css. I've seen various example of a 3 to 4...
2
by: mouseit101 | last post by:
Hi, I'm writing a script that would (hopefully) search google images for whatever, and then return a list of URLs for the image. Right now I have: $dom = new DomDocument(); $url =...
0
by: Frenchie | last post by:
Hi, I have created a very neet menu from an example found on the MSDN library at: http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitembinding.imageurlfield.aspx My...
1
by: Cerebral Believer | last post by:
Hi folks, I am using the following code for mouse over (roll-overs) in my XHTML code. <a onmouseover="document.getElementById('sitemap').src = '../images/buttons/sitemap_mo.jpg';"...
4
toxicpaint
by: toxicpaint | last post by:
Hi, can anyone give me a hand. I'm currently displaying 4 random images at the top of a page. I did this using an array of 35 pictures and then writing them to page. The problem I have is that in...
5
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...
0
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...
0
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,...

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.