Topic: About adjust OLE object in Report Custom Functions Posted: 17 Jun 2012 at 11:32am
Hi,
There is an OLE object - picture in my report, how can I access/change the picture's properties, such as Width.
Using Basic Syntax:
Dim thePicture As Object
Set thePicture = LoadPicture("c:\temp\myPicture.bmp")
Set Picture1.FormattedPicture = thePicture
Picture1.Width = thePicture.Width
Picture1.Height = thePicture.Height
It doesn't work:
1. Object is not data type
2. LoadPicture can be found
3. Picture1 is a field of OLE object in my report
My question:
1. how to load a picture
2. how to change the ole object's properties
Which version of Crystal are you using? In XI (I believe) and above (I know this is in 2008 and 2011) you would do the following:
1. Right-click on the image object and select "Format Graphic"
2. Go to the Picture tab.
3. Click on the button by "Graphic Location"
4. Select the field that contains the location of the image.
5. Make sure that Scaling is set to 100%.
6. Go to the General tab and turn on "Can Grow"
7. Click on OK.
-Dell
Thanks, Dell.
My Crystal Report is 2008. Maybe I didn't make my question clearly. I mean, how to use VB in Formula Editor? Such as, change the picture's width. For example, my picture just in Details, the Object Name is Picture1. But I can't use Picture1.Width=10 to change its width.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum