Crystal Reports Pictures

equis
01-18-2004, 02:49 AM
Hello,

I have learnt how to change text in crystal reports from vb using code "test.settext" but was wondering if anyone knows how to chnage the picture at runtime?

Thanks

:-)

MKoslof
01-19-2004, 12:30 PM
Are you using the RDC? .Net and VB 6 handling of Crystal images is quite different.

Are you reading the image into a Dataset? The best way is probably to read the image into a type DataSet. You would need to utilize an image field. With the dataset, include the data needed and the wanted image..and bind the new datasource to the report

crxRepDoc.SetDataSource(thisDataSet).

Do you have any code written so far? For a nice review of how to read an image into a DataSet..you can browse here:

http://support.microsoft.com/default.aspx?scid=kb;en-us;308042

equis
01-19-2004, 01:39 PM
Hello,

Thanks for the Reply,

I am using VB6 with ADO, I am not storing the image in a Database, I would if thats the only way to go, but would rather not.

I have the file path stored in the database (postgresql)

I wanted to use the report unbound from any datasource :-)

Thanks Again

Rhys

MKoslof
01-19-2004, 01:49 PM
OH...well if you are using VB 6 this is the wrong forum. We should get this moved to the VB 6 database forum. You want to do something totally different then...this is the .net forum.

Look into the LoadPicuture method. This will allow you to dynamically place a picture on an OLE Object field within a Crystal Report. Basically, create an OLE Object on your report designer. Then, in your code..when launching the report assign the picture you want using LoadPicture.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum