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!

Runtime Error 20000

Status
Not open for further replies.

moolie

Programmer
May 7, 2002
193
CA
VB 6.0 professional with service pack
Crystal Reports 8.5 developer edition

I've searched for a solution to this runtime error and have come up empty handed. On some machines, Win 98 when the .action = 1 event is triggered I get Runtime Error 20000 no error message which drags down the whole application. Unfortunately I'm not able to reproduce the error on my development or test box. The code looks like this:

If optDetail.Value = True Then

rptRentalCalendar.ReportFileName = ReportPATH & "RentalCalender.rpt"

ElseIf optSummary.Value = True Then

rptRentalCalendar.ReportFileName = ReportPATH & "RentalCalenderSummary.rpt"

Else

rptRentalCalendar.ReportFileName = ReportPATH & "RentalCalenderSummary.rpt"

End If

rptRentalCalendar.Action = 1

Any suggestions?
 
Report generating Runtime Error ‘20000’:

Problem: Error printing report from VB using crystal reports 8.5

When running Rental Calendar Report in a VB, the system generates a runtime error ‘20000’, with the text message ‘No error’ and then the application terminates. Even when error handlers are included the program crashes and would usually crash the entire system.

Why?

Because of the Rental Calendar Report has about 10 sub reports which contain mostly large quantities of data and calculations (summaries and totals) the report trigger “.action = 1” would consume more memory the system could support. The main problem lay within the VB itself and not in the Crystal Report. The VB form contained various ADO data controls, data lists and bound properties, which load memory at the initialization of the form and release at exit from the form. So, the VB form occupied most of memory for controls & list and remaining memory will be used to generating the report, which also has require more memory than the data controls. Also the ADO controls do not relinquish their connection to the database. The reports use a different method to access the same data, without a queue the controls crash into each other and the memory usage goes off the scale.

Solution:

Various means where uses to try to figure out this problem. We searched the Crystal Report help & website ( but couldn’t get any useful information. As well, searching development forums yielded no clear definition of the problem or any useful information that would assist in finding a solution. Narrowing down the exact cause of the runtime error proved challenging in that the computer shutdown every time when we tried to run the Rental Calendar report. If we removed the ADO data controls & data lists and used runtime ADO code to access the data we could control the connection to the data. The reports then processed and generated successfully. We removed the ADO data controls & data list and coded the connections to the database for both the VB access as well as the Crystal Reports access. The memory was then used for the process and released after firing the report. Less memory was needed to run the application as to fire the report.

Result:

After changing the way the Application and Crystal Reports accessed the database the runtime error disappeared.

Just a note: The error was only generated on a Windows 98 machine with Access 2000. We were not able to recreate the error on another machine. Windows 2000, NT and XP all handled the original application and Crystal Reports without the error. By using the Recordset method of an ADODB object we were able to populate the data lists etc without bogging down the database or using too much memory. The program run and looks the same as before only there in no longer any conflict for database access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top