Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
JWiseman
Active Contributor
0 Kudos
48,638
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.



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.
2 Comments
0 Kudos
I tried every steps. I am using dynamic images, passing from the code (path of emf images) to crystal report . It doesnt seems to be transparent. Its overlapping
JWiseman
Active Contributor
0 Kudos
Hi Harjeet, here's what works for me for inserting Dynamic .emf images as opposed to the above choices which are more for getting a one-time / static image in.

  1. Create a new formula on your report that provides the path to your image...e.g.  I used 'Picture' + totext({Customer.Customer ID},0,'') + '.emf' to provide a customer ID related file.

  2. Choose the Insert menu and then Picture and choose 1 of your .emf files to drop onto the appropriate Group or Details section. It may show up as blank after you do this, like it did for me.

  3. Right click on the picture and choose Format Graphic > go to the Picture tab > click on the Graphic Location formula button.

  4. In the Formula Editor just add the new formula that you created in step 1. At this point the picture should show up as opposed to being blank and it should be dynamic as per your formula.


Note that i am using Crystal Reports 2016 SP 8 Patch 2.

regards, -jamie