Problem printing Crystal Report from VB - Run Time Error 20599
Posted on 2003-11-17
I am using Visual Basic 6.0 to connect to a Crystal Report through the Crystal Report control crystl32.oxc. The report was generated in the 32-bit Crystal Report Designer in Crystal Reports 6.0 and connects to an Access 2000 database.
The Crystal Report Control is setup to connect to the report (ReportFileName = "C:\Database\matdata.rpt") and to print to the window (Destination = 0). All other parameters are set to default.
A command button is used with the single command:
This originally worked, but the database was not being updated. I read that I needed to change the "Save data with report" option to be unchecked in order for the data to be updated. I unchecked this option and saved the report.
Now when I run the program and call the above print command, I get the following error:
Run-time error '20599':
Cannot find SQL server.
I'm not sure if this is a problem with the way that I am creating the report or with how it is being called from VB.