Even though there is no support for certain image types and no support for most transparent image types in Crystal Reports, there are several methods / workarounds that you can employ. This blog post goes through several of those methods.

Untitled.jpg

If you open your online help in Crystal Reports and Search for Image, the Working With Static OLE Objects link will take you to the list of supported image types.

You can insert a number of different types of static OLE objects into your report. Crystal Reports supports these pixel-based image formats:

Windows Bitmap (BMP)

TIFF

JPEG

PNG

As well, Crystal Reports supports this vector-based image format:

Windows Metafiles (both WMF and the newer enhanced metafile format).

However, transparent backgrounds are not supported for most of these image types. More about the supported types later. Here are the workarounds that you can use to have images with transparent backgrounds in your reports.

A) Use Underlay Sections

This method does not use transparency, but is a workaround that is simple to use. You still need to use images that are supported types in Crystal Reports for this method to work. The following steps can be employed to fake having transparent images in your report.

1 – Right click on the Section Name (e.g. Report Header) where you want the image to appear and choose Section Expert.

2 – Press the Insert button and then press the Up arrow to move the new section up one level.

3 – Select Underlay following sections for this new section.

4 – Insert your image into this new section.

B) Use WMF or EMF Files

WMF & EMF files are supported image types in Crystal Reports and can also have transparent backgrounds work in your reports.

If you don’t have a graphics program that will convert your image to WMF or EMF then you’re still in luck if you have MS Office. Open up PowerPoint and copy or insert your image into a new PowerPoint file. Then right click on the picture and choose Save As Picture and .wmf and .emf types are available. You can now insert this newly saved picture with a transparent background into your report.

C) Use a MS Word Document as an OLE Object

If you’ve got MS Office, create a new Word document and then insert your image file into the new document.  Move the image to the top left corner. In Page Layout choose Size > More Paper Sizes > Paper Size select > Custom Size. Choose a width and height the same size as your image.

Now go back to your report and choose Insert > OLE Object > Create From File and then choose the .doc that you just created.

D) Use a SWF File

See Andrew Baines Blog on using a .swf file.

Note that all of these methods above do not work when you’re using dynamic images, via the Graphic Location feature in Crystal Reports, unless you convert your current image types to EMF as an example.

There is a sample report attached to this blog post that is applicable to methods B & C below. Extract the contents of the .zip file and change the .txt extension to .rpt.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply