Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change CR image with code

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
Here's a tricky one. Does anyone have any idea how to change an image on a Crystal Report via code?

I have an application that I am building in VS2005 (code behind is vb). I have a report that I want to use code to change the picture based on the recordid. The pictures are stored on a network file.

Anybody, somebody, help me please.

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Why not pull the back the URL from your SQL, then you don't have to do it in the code behind?
 
Thanks. Ok I can go with that.

So you are saying put the path of the pic in the datasource? How do I use that for the picture? The picture object in the VS2005 version of CR does not seem to have a lot of properties to work with.

Thanks again for a quick response as usual jbenson001.


ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
It's been a long time since I have used CR. I'm sure there's got to be somewhere you can give it the source for the pic. If not, if it is a simple report, you can create it yourself using a repeater and an image control.
 
Hi,
You can turn any text formula into a hyperlink in CR so you should be able to create a <href - type image link that way...

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thanks Turkbear,

I don't do much in CR in the VS2005. Can you give me an example of the text formula you speak of.

Thanks again.

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top