Crystal Reports SelectPrinter command error  
Author Message
Vedat ARAL





PostPosted: Visual FoxPro General, Crystal Reports SelectPrinter command error Top

Hi All,
We have a VFP 8.0 program uses Crystal Reports XI object to print one of our reports.
Last week the program started giving a Fatal OLE error on SelectPrinter command. "Exception code c0000005. Ole object may be corrupt.".

We haven't change the exe file, we haven't change the report and we didn't install any new thing on the computers.

Here is the code:
CRApplication = CreateObject ("CrystalRuntime.Application")
CRReport = CRApplication.OpenReport("DailyReport.rpt")
CRReport.SelectPrinter('AdobePS Acrobat Distiller','Acrobat Distiller','c:\temp\*.pdf')
CRReport.PrintOut(.F.,1,.T.,1,1)
Release CRReport, CRApplication

Any information is greatly appreciated.
Thank you in advance,


Visual FoxPro2  
 
 
Craig Berntson





PostPosted: Visual FoxPro General, Crystal Reports SelectPrinter command error Top

First thing is to delete all references to FoxUser.*

 
 
Endre E





PostPosted: Visual FoxPro General, Crystal Reports SelectPrinter command error Top

Hi!
I see the same in my application using ActiveReports. Application is in vfp7, but I have tried also with vfp9 with same result.

What exactly do you mean by "delete all referencec to FoxUser.*"

Thanks! :-)


 
 
Craig Berntson





PostPosted: Visual FoxPro General, Crystal Reports SelectPrinter command error Top

The Foxuser file is created by the application when it starts up. It is used to store information about the application, but is generally not needed at runtime. Find all references to the file by searching the hard drive. Delete them. To stop the file from being created, but RESOURCE=OFF in the Config.fpw file.

 
 
Craig Berntson





PostPosted: Visual FoxPro General, Crystal Reports SelectPrinter command error Top

Reading this again, why are you printing to Acrobat Distiller instead of exporting the report to PDF