Solved

Insert image by code

Posted on 2003-10-23
8
1,066 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
Comment Utility
0
 
LVL 4

Author Comment

by:Brimba
Comment Utility
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
Comment Utility
Sorry, I haven't done anything with pictures in my reports.

mlmcc
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 4

Accepted Solution

by:
jrmn earned 300 total points
Comment Utility
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
Comment Utility
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
Comment Utility
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Glad I could help

mlmcc
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

18 Experts available now in Live!

Get 1:1 Help Now