resizing picture object in crystal report 8.

Posted on 2004-09-09
Last Modified: 2012-08-14
i'm creating a report that include a picture object in it. i want the picture to be displayed in it's own size. The problem with picture object is the picture will be displayed fix the picture object size (stretch). Is the any other way to show the picture with it's own size (not stretched)?
Question by:craduza
  • 3
LVL 42

Accepted Solution

frodoman earned 50 total points
ID: 12015601
If you're using the RDC components then you can do this by setting the mode to "auto-size".  See more details here:

If you're just pulling in a picture from a database then AFAIK there isn't a way to do this.

LVL 10

Expert Comment

ID: 12020252
in with a small application you can reference the picture object and resize it programatically

CrystalDecisions.CrystalReports.Engine.PictureObject picobject;
picobject.ObjectFormat.EnableCanGrow = true
picobject.height = xx = xx
picobject.width = xx
picobject.left = xx

If you need more help let me know


Author Comment

ID: 12040638
i'm still working on the code...:) hope it will work.

Author Comment

ID: 12041127
i'm using VB6 with Crystal report 8

Author Comment

ID: 12042748
i've solved the prob. with my own style..:D

Dim thePicture As Object
Dim xRatio As Single, yRatio As Single

Set thePicture = LoadPicture("c:\windows\desktop\yahoo.bmp")

'calculate the ratio
xRatio = Picture1.Width / thePicture.Width
yRatio = Picture1.Height / thePicture.Height

'use the smallest ratio value to resize the original picture
If xRatio < yRatio Then
     Picture1.Width = CLng(thePicture.Width * xRatio)
     Picture1.Height = CLng(thePicture.Height * xRatio)
    Picture1.Height = CLng(thePicture.Height * yRatio)
    Picture1.Width = CLng(thePicture.Width * yRatio)
End If

Set Picture1.FormattedPicture = LoadPicture("c:\temp\myPicture.bmp")

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Horizontal Lines in crystal reports 6 76
Crystal Reports - Trim Data 7 51
Crystal Reports get subgroup count 1 50
Printing duplex pages and have a page break 6 44
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In a recent question ( here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question