Solved

resizing picture object in crystal report 8.

Posted on 2004-09-09
5
2,393 Views
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)?
0
Comment
Question by:craduza
[X]
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
5 Comments
 
LVL 42

Accepted Solution

by:
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: 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.

frodoman
0
 
LVL 10

Expert Comment

by:ebolek
ID: 12020252
in vb.net with a small application you can reference the picture object and resize it programatically

Code:
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

0
 
LVL 1

Author Comment

by:craduza
ID: 12040638
i'm still working on the code...:) hope it will work.
0
 
LVL 1

Author Comment

by:craduza
ID: 12041127
i'm using VB6 with Crystal report 8
0
 
LVL 1

Author Comment

by:craduza
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)
Else
    Picture1.Height = CLng(thePicture.Height * yRatio)
    Picture1.Width = CLng(thePicture.Width * yRatio)
End If

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

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

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 …
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

728 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