Solved

Insert image by code

Posted on 2003-10-23
8
1,068 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now