473,775 Members | 2,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2601
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*******@hotm ail.com> wrote in message
news:11******** **************@ y41g2000cwy.goo glegroups.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*******@hotm ail.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.Heig ht = imgPicture.Imag eHeight
imgPicture.widt h = imgPicture.Imag eWidth

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*******@hotm ail.com> wrote
I've put the following code into the
'On Format' event in the 'Detail'
section of the report.

imgPicture.Heig ht = imgPicture.Imag eHeight
imgPicture.widt h = imgPicture.Imag eWidth

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 "ImageHeigh t" 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*******@hotm ail.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
2365
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 patch updating worked fine and showed the pictures. Now the pictures no longer show when looking at the source code the absolute path of the file is correct but will not display the image. I tried it on another 2000 adv svr and the script worked...
3
3829
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 nutshell when testing my ASP.NET (localhost) apps images randomly don't load on the page. Examining the IIS logfile shows the missing images give 401 or 403 errors. Here's an example - 10:15:47 127.0.0.1 GET...
10
2368
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. That is, images inline with the actual content of the blog itself. Is there an example that I can be pointed to, where I can examine some code and figure out how to do this? Frankly I haven't got a clue, aside from breaking the content up into...
6
4604
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 column layout. Is this the only way to accomplish this? To see the table in its current format, please go here: http://www.godofmod.com
2
3802
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 = "http://images.google.com/images?q=hello"; $dom->loadHTMLFile($url);
0
1840
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 ASP:MENU uses images to create the buttons. Unfortunately, I can't get the buttons to link to pages. Also I can't remove the "sitemap" from the left of my menu.
1
1403
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';" onmouseout="document.getElementById('sitemap').src = '../images/buttons/sitemap.jpg';" href="../sitemap.htm" border="0"> <img id='sitemap' src="../images/buttons/sitemap.jpg" border="0" alt="Site
4
2974
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 theory you could get the same image 4 times. I quite often get 2 of the same picture come up. What's the easiest way of saying "once an image is assigned to a variable, take it out of the array"? Here's my code so far.. images = new Array(34);...
5
4118
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 (images) shows with roll overs as well. That's what I have... <script type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc; }
0
9454
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
9916
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
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
7464
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
6718
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
5360
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
5486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4017
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
3611
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.