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

Out of Date or missing

Status
Not open for further replies.

SilverBean

Programmer
May 23, 2001
44
US

I've been charged with migrating a 16 bit VB 4 App to VB 6. The 16 bit stuff was never present on the machine that I now use so I'm reasonably sure there is no left over 16 bit contamination. The application allows the user to either view a report in a Crystal Report Window or print the report directly to a file. I'm using (apparently) V4.6 of Crystal Reports Pro although the help files reads 4.5. When I access Crystal reports during design time from the Add Ins, Report Designer sequence I am able to view reports and export to files without a problem.

A code fragment is below:

cryReport(i).ReportFileName = txtTempNamePath(i).Text
cryReport(i).Destination = crptToFile
cryReport(i).PrintFileName = txtReportPathOutFile(i).Text
cryReport(i).PrintFileType = crptText
cryReport(i).Action = 1

The problem is during run time under VB6.0 envirnoment execution stops with a 20540 missing or out-of-date export DLL. I can assure you that variables above are initialized correctly. It looks like the original author setup arrays to do several such reports - based on whatever the user has requested. The debugger highlights the Action = 1 line. If I were to direct the .Destination = crptToWindow that works fine with no problems. Oddly enough though, 2 icons in the toolbar don't seem to function that is the suitcase along with the paper clip and enevelope icon don't do anything. I thought one of them allowed output to a file from this crystal report window.

The 20540 error is a Crystal Report Error, which the help file provides the marvelous insight that I have a missing or out-of-date dll. This error type is listed as a run time error for the Active X control. I'm out of my league here. I'm trying to stay away from the ActiveX for purposes of this migration - is this going to be possible?

I started a smaller test type application isolating this specific operation. The database file is working in other areas of the application that I have seen, editing, copying, deleting, and displaying the records fine - though it maybe an older DB from VB 4.0. The report template is a new - one one of my first guesses was to create a current report template.

I started off with a standard EXE and have the following references included:
Visual Basic for Applications
Visual Basic runtime objects and procedures
Visual Basic objects and procedures
OLE Automation

I see the error at the same point of execution. Am I missing something here?

I have rebooted my machine since the crystal reports installation which did not take place automatically for me when I installed VB 6. I had to manually go back on to my VB 6.0 CD and find the installation for Crystal Reports. The properties for the control "on the form" itself, about says Crystal Reports OLE Control Version 4.6 while Crystal Reports PRO, About indicates Crystal Reports for Visual Basic "Product 4.6.1.0 CRW32 4.6.1.116".

Since Crystal Reports PRO is working fine, and the crystal window is working fine in the application - I'm having a hard time thinking that a DLL is missing let alone out of date. What do I know I'm the one asking for help.
 
To help sniff out dll/exe dependency issues, I strong recommend getting the free MS utility Dependency Walker, from the eponymously named site. This will narrow down the problem, if nothing else. Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top