resizing picture object in crystal report 8.

Posted on 2004-09-09
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 42

Accepted Solution

frodoman earned 200 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: http://support.businessobjects.com/library/kbase/articles/c2003171.asp

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 vb.net 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
picobject.top = 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

777 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