Link to home
Start Free TrialLog in
Avatar of David Workman
David WorkmanFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Crystal Reports Version 7

I am trying to dynamically update an image in a crystal 7 report using vb6. The report works fine. I have tried everything possible using the OLE facilities in Crystal 7. I inserted an image, linked to the image file and then copied a new image file with the same name to the same location. The image does not refresh. I have tried putting the image in a word document and then inserting the word document as a linked OLE object but I get a message saying the document is not available and links have not been updated. I have used a CRPEAuto.OLEObject in vb6 to find the oleObject in the report and tried to set its properties:

'Set m_rptReport.Sections(intCounter).ReportObjects(intCounter2).FormattedPicture = LoadPicture(App.Path & "\mtTemp1.jpg")' ------ Error 438?

2 days and counting on this problem now.

Do I need to update Crystal? this would be a major amount of work. I have around 100 reports out there which would need to be updated? If so which version would be best? I am using ADODB against Access and SQL Server 2012 Express. I need to be able to distribute the Crystal engine with the vb6 application.

I know its legacy stuff all round but I am updating slowly. Moving to SQL server this month (beta deployed). Then.Net!

Thanks for any help/comments.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David Workman

ASKER

Thanks mlmcc

Considering that I am using access 97 (moving to SQL server imminently), how could I insert a jpg image into a database table using vb6 and ADODB? Open the file as binary and then assign the contents to a variable and then APPEND the table using SQL?

I was thinking that I could update a temporary table with the image file and SELECT it in the report recordset. Do you think the report would show the field data as an image?

Apologies if I am over stepping protocols here or posting a second question inappropriately.
Avatar of Mike McCracken
Mike McCracken

I don't know how you add the image to the database.  You might ask that in the MS Access area.  Be sure you let them know you are using MS Access 97.

Since you are on MS Access 97 you may have to stay with Crystal 7 or upgrade if you can find it to Crystal 8

mlmcc
Many thanks mlmcc.