Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crystal Reports will insert certain images but not others

Are there specific requirements for images that are to be inserted into CR?

I’m trying to insert an image into Crystal reports, but nothing happens after I select my file. I have a different image that I’ve used for testing that inserts with no problems so I’m assuming that it has something to do with the JPG file settings when saving the image. Note that this is just a static logo for a page header – nothing is being dynamically loaded.

I know that GIFs cannot be used, so I’ve tried JPG and PNG to no avail. I’ve even saved my “working” image again through Photoshop and it will insert. I’ve then used those settings to save the non-working image, but that image wont insert. I’ve used Crystal Reports a lot in the past and this is the first time I’ve come across this issue and my searches lead me to a variety of resources for dynamic image inclusion, but nothing to for this hopefully simple issue.

I’m using Crystal Reports for Visual Studio 2010.

Link to images used in testing

like image 951
Dave Mroz Avatar asked Apr 17 '12 14:04

Dave Mroz


1 Answers

After messing with this problem all day, I found out it’s a bug in the Crystal Reports IDE.

Here’s how to duplicate the issue:

  1. Right click on your report and select Insert >> Picture
  2. Double-click on the image that you wish to insert.

Depending on your image and how the image was saved in Photoshop, it may or may not insert into the report. I’ve had mixed results and apparently some images work and some do not. I haven’t quite figured out the pattern yet, but I believe it has to do with the color profiles of the image. I probably won’t waste any more time investigating it, because the following resolution has worked for me every time and I can import every image that I’ve created in Photoshop regardless of how the image was saved and the settings used to save the images. (Assuming that they’re all JPGs, of course.)

Resolution:

  1. Right click on your report and select Insert >> Picture
  2. SINGLE-click on the image that you wish to insert to select it.
  3. Click “Open”

The image should insert into the report properly.

It’s a subtle difference, but I hope this saves someone else a few hours of debugging.

Dave

like image 130
Dave Mroz Avatar answered Sep 22 '22 23:09

Dave Mroz