Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Insert image by code

Posted on 2003-10-23
Medium Priority
Last Modified: 2009-12-16

Is there a way to insert a image by code in Crystal Reports?

I have tried to add an image-object, but I cannot find any way to change the path for it...

I know I can use a "blob"(image) field in my database and store the images there, but I need another solution.

I am using VB.NET

This link did not help me: http://support.crystaldecisions.com/communityCS/FilesAndUpdates/cr9_vb_rdc_loadpic.exe.asp

Question by:Brimba
  • 4
  • 2

Author Comment

ID: 9612653
The problem is that in all those examples they are using the OLEObject and then the FormattedPicture. But when i search in the help for CR i find none of them...

I think I have to use the PictureObject but i cannot find any way to change picture.
I can set border, width and everything but not change the picture..

LVL 101

Expert Comment

ID: 9618561
Sorry, I haven't done anything with pictures in my reports.

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.


Accepted Solution

jrmn earned 900 total points
ID: 9630809
Hi Brimba,

For an additional information(just in case) :

1. As of version 8.5, there's no way to redirect the file path (say from c:\images to c:\pictures) for OLEObject. You have to be sure that when you distribute your rpt, that a folder with the exact path where you link your OLE object can be found on the client machine. So when you designed your rpt and it looks at c:\images\ directory, you have to be sure that on the client machine you also have this directory created and with the images on it.

A friend once told me that this is possible using RDC. Try to read articles on this one at crystaldecision site.
Sorry to tell you that I haven't tried this one yet and don't have any idea how to make it work as I'm into Delphi programming.

An officemate told me that currently, the CR for .NET components donot provide any other method to dynamically insert images into your report. The Section Format events are available in RDC which allows changing images dynamically in a report. You can also consider using the RDC within your .NET application, but however using the RDC in a VS .NET application means that you will be making use of unmanaged code and therefore not take advantage of many of the .NET features such as automatic Garbage Collection and Automatic Thread Marshalling. I suggest you to refer to a Technical Paper on RDC and .NET. It describes using the Report Designer Component (RDC) in Microsoft Visual Studio .NET (VS .NET).

To download the same, please point your browser to the following location :




Author Comment

ID: 9641161
I believe the answer is not worth 500 points.

But I would like to give jrmn 250 points for the time he/she spent on my problem!

The problem is not solved and therefore I would like to delete the question.
LVL 101

Assisted Solution

mlmcc earned 600 total points
ID: 9647345
LVL 101

Expert Comment

ID: 9654659
Glad I could help


Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question