Forgot password? | Forgot username? | Register

Resize images in crystal reports

Resize images in crystal reports

Hi

Can anyone tell me how in crystal reports it is possible to resise images exported from EMu to fit into a certain size on a report whilst maintaining the original proportions?

Looking at the picture resize and 'can grow' options in the format box it seems there might be a way to create a formula that works based on image width / height meta data, but I cant see how.

All I need is for images to appear slightly larger than thumbnails withought aspect ratio distortion, irrispecive of the original image size.

Thanks

Mark

Edited by: Mark Pajak - 12-Jan-11 03:38:40

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Resize images in crystal reports

Hi Mark.

The way images are handled in Crystal (every version up to XI) is somewhat flawed.  If only they'd included a "constrain proportions" on the Image tab of the Insert OLE Object window then it would solve the problem.

We've not found a perfect solution, but the best we've got is as follows (assuming a catalogue report):

1. Include the Multimedia field in the report definitinon (under Identifier group for us).
2. In Database Expert, add the MulMulti_csv table
3. Insert OLE Object and choose Bitmap Image
4. Resize the image frame to the size you need on the report
5. Drag and drop the Multimedia field inside the OLE Image boundaries.
6. Suppress the Multimedia field

Run the report.

This method dynamically feeds the location of the images to the OLE Image object, and forces the image to resize until either its height or width match the OLE image frame you have inserted. So if you insert a portrait shaped frame, then a landscape image will be constrained to the portrait-wide frame, and thus look smaller than a full portrait image. (There may be a way to create two frames, one for portrait and another for landscape, each in separate report sections with conditional supression based on the height vs the width, but we've not bothered)

Note the Images will not diplsay in Crystal Report writer. You will only see the pictures in the report when run from EMu. Really annoying!

Hope this helps.

Mark Bradley – Assistant Registrar, Documentation (EMu)
National Gallery of Australia

Mark Bradley
Assistant Registrar (EMu Guy)
useravatar
Offline
147 Posts
Male  Website 
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Resize images in crystal reports

Hi Mark
Thanks so much  - that worked perfectly!
Mark

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Resize images in crystal reports

ok another question - I cant see how this method would allow multimple images to display properly? When I set the reports properties to 'all images' they all seem to be stuck on top of each other - is there a way around this?

Thanks

Mark

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Resize images in crystal reports

Hi Mark

If the Multimedia frame and field are in a details section then the section will repeat for each image.

I've attached a very basic Catalogue report that achieves this. It's zipped as rpt is not a supported format on this forum.

Report Definition in Emu:
https://emu.axiell.com/images/agorapro/attachments/1394/mini_Report-Definition.jpg

Database Expert in Crystal:
https://emu.axiell.com/images/agorapro/attachments/1394/Database-Expert.jpg

Table Joins:
https://emu.axiell.com/images/agorapro/attachments/1394/mini_Table-Joins.jpg

Report File:

Hope this helps.

Mark Bradley – Assistant Registrar, Documentation (EMu)
National Gallery of Australia

Mark Bradley
Assistant Registrar (EMu Guy)
useravatar
Offline
147 Posts
Male  Website 
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic

Board Info

Board Stats
 
Total Topics:
603
Total Polls:
0
Total Posts:
1363
User Info
 
Total Users:
871
Newest User:
Monica Syrette
Members Online:
3
Guests Online:
90