crystal reports how to display an image dynamically in code from

Hello Experts!
My problem is I am trying to create a re-usable report that can be used for many customers.  I customize each report with an image logo for that customer.  The reports are run from an web page.  I am using Crystal version 9, and I have read posts that not until version 11 can you dynamically display an image to the report, in version 9 only the link shows which is unacceptable.  So, is there a way in to set the location of this image to a path or URL, and how would I do this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

As far as I know in version 9 your only option for a dynamic image would be to put the image itself inside your database as a BLOB (instead of just putting a path to the image).  This does work just fine, but the downside is that it's a lot of additional storage space needed in your db to hold the images.

tegronakronAuthor Commented:
I thought there was a way in the vb code to assign the image to a path?
I tried to do it this way, but was unable to figure it out.
I may have misread your question.  So you want a single image per report?  What you'll want to do then is always have your image in the same place (c:\logo.bmp for example).  To put the image in Crystal:

Insert -> OLE Object -> Create From File.  Now browse to the image (c:logo.bmp or wherever) and make sure you've checked the "link" box right below the file path.  Now you can change your image (copy a different image to c:\logo.bmp) and next time the report is opened the new image will be used.  Note that it will only update when you RE-OPEN the report - simply refreshing won't do it.
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

tegronakronAuthor Commented:
I tried exactly what you said there.  It looks like it creates an icon instead of the actual image in Crystal Design view and also when I run the report?  Any reason that would be?  I am exporting to a pdf file in case that makes a difference.
Is your image a .bmp?  I don't think this works properly with other formats because Crystal internally converts other images to bitmaps.
tegronakronAuthor Commented:
well I tried it with a converted bitmap, I will try it with an original bitmap
tegronakronAuthor Commented:
I created a bitmap in paint and then inserted it to my crystal report as an ole object with a link.  Still shows up with an icon and the test.bmp text below it.
When you insert an OLE-Object there is a checkbox for "display as icon" - make sure this is NOT checked when you insert the object.  Sounds like it may have been - if you double-click on the icon does the bmp open in MS Paint (or whatever default editor you have set)?

Also make sure you save the report and close it completely.  Now when you open it again, you should see a progress bar with a message "Active-X links updating" (or something similar - don't remember the exact text).
tegronakronAuthor Commented:
I saved the report, and closed it, opened it again, and didn't get the "Active X Links updating" message and it still is an icon.
I assume you also tried adding a new one and insure the display as icon wasn't checked?

I've tried to replicate the behavior you describe and the only way I can do it is with an invalid image format (e.g.: gif).  Maybe you've got a .bmp format that Crystal doesn't support?  Perhaps try it with a .jpg image instead and see if you have better results?
If the image shows as icon, then you need to configure the relevant ole server. This article explains how (ie install Microsoft Photo Editor). The article is about a slightly different problem, but the same resolution steps apply to you

Another option to change images on a report in .net would be to
- either upgrade to Crystal Reports XI Developer (not sure if that has been mentioned above?)
- or to pass a dataset to the report which contains the image(s) you want to see
tegronakronAuthor Commented:
Well as the link you posted suggest, I tried to double-click on the icon in the report and it brings up a prompt that says "Do you want to open this file?"  Then if I click ok, it opens Microsoft Office Picture Manger.  Then it displays ok, I do not have Microsoft Photo Editor on my machine currently.  Do you think that would make a difference?  
With regard to your post frodoman, I did at a new one, and made sure the display as icon wasn't checked.  I also tried it with a .jpg that i created in MS Paint.  I am still getting icons.  Is there perhaps a service pack for Crystal to fix this?
I think all I have is the original installed.

I'm not aware of a patch that specifically deals with this but certainly it won't hurt you to update - it may have been solved long ago and I just never heard about the problem.  You can get the latest updates here:

>>> Then it displays ok, I do not have Microsoft Photo Editor on my machine currently.  Do you think that would make a difference?  

Sorry, I just re-read what you wrote.  ***YES*** this will make a difference.  From the link that EwaldL posted, you do need an OLE object server that can translate image types.  Doesn't have to be MS Photo Editor, it could be Photoshop or other image editing software as well.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tegronakronAuthor Commented:
I found an article about how MS Photo Editor is removed when you install Office 2003 and replaces by Microsoft Office Picture Manager.  So I removed Microsoft Office Picture Manager by running Office 2003 setup and set Microsoft Picture Manager to be Not Installed.  When I re-run the report now, it shows the picture.  This only works for bitmaps, my jpg image still gave me the icon, but that is ok.  The client may not have Office installed so therefore this might not be an issue.  Thanks for the solution!
Glad to assist.  

You might want to look around for OLE object servers - I don't know but I suspect that there may be one you can distribute in case your clients don't have Office or possibly even a Windows component that can be installed.  Good luck!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.