Crystal Reports 2013 OLE size in function

47 Views Asked by At

how to get the width and height from a image and set those as measurements of a ole element inside a function?

The problem is, if I use a image inside a ole element, the image wil be cropped to 5x5cm instead of leaving it as it is 2x5cm.

In a other thread I found this from C#:

System.Drawing.Image img = System.Drawing.Image.FromFile(@"c:\ggs\ggs Access\images\members\1.jpg");
MessageBox.Show("Width: " + img.Width + ", Height: " + img.Height);

But it seems C# doesn't work in crystal syntax.

1

There are 1 best solutions below

0
On

You can do this using a Crystal Reports UFL (User Function Library).

One of the 3rd-party UFLs listed here provides a Crystal function to return image dimensions. It also provides functions to Resize and Crop images.