Solved

Insert image by code

Posted on 2003-10-23
8
1,070 Views
Last Modified: 2009-12-16
Hi!

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

Thanks!
0
Comment
Question by:Brimba
  • 4
  • 2
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 9610122
0
 
LVL 4

Author Comment

by:Brimba
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..

Thanks!
0
 
LVL 100

Expert Comment

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

mlmcc
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 4

Accepted Solution

by:
jrmn earned 300 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 :

http://support.crystaldecisions.com/communityCS/TechnicalPapers/crnet_rdc.pdf

Goodluck,
jrmn


0
 
LVL 4

Author Comment

by:Brimba
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.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 200 total points
ID: 9647345
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 9654659
Glad I could help

mlmcc
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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 …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 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