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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing picture source

Status
Not open for further replies.

hjuan99

Programmer
May 12, 2003
4
US
I am trying to insert a picture into a report but I want the picture to change with each page of the report. I have a field in the database with the path to the picture. How do I change the source of the picture to be the field in the database with it's path info.
ie. I can insert a picture and browse to it's source. How do I change that source programmatically.

Thanks,
John
 
Check out our March 2003 issue of Crystal Clear where we show 4 different ways to do this.

1) The easiest way is to put your image in a DB field
2) You can write a custom viewer in vb to trap the section format event and change the image.
3) I have a COM data driver to create a recordset with the embedded image
4) I have a UFL to burst the report, send HTML formatted messages with embedded dynamic images.

What are you trying to do with your report?

Editor and Publisher of Crystal Clear
 
I have about 4000 images in a folder and each one corresponds to a different row in the database. When I create the report for that row, I need the image to change to the corresponding image. One of the fields in the database is a text field that contains the path on my computer to the image for that row. (the images are graphs that I've created from data in the database so I guess I could create the images in some other ole format if this can be done easier another way). Last year I did this report in Access' report writer and I was able to just change the source of the image. This year we've moved to Crystal and I can't figure out how to change the source so that I get the correct image on the correct report page.

If there's an easier way to do this than to use a 3rd party com driver, I'd really appreciate the advice. I don't really care how fast (or slow) it runs because all of the reports get run on my computer one time and then get printed out. Nobody else has to deal with execution time but me (they all get nice printed up copies).

Thanks for the help.

John
 
ok, so I looked at Thread 149-370665 which talks about how to do this. However, I still don't understand where I'm supposed to change and insert that code. I'm using CR for .Net and don't know how to convert a .rpt to a DSR (whatever that is).

Please help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top