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!

Logon failed error when printing report from VFP

Status
Not open for further replies.

MichelleCox

Programmer
Feb 10, 2004
5
US
VFP 8 & CR 9

I have a form in VFP that calls the "CrystalRuntime.Application" object to print a report. It was working just fine one day and the next I started getting an error. It gets as far as asking me what pages I want to print and then I get, "OLE IDispatch exception code 0 from Crystal Reports ActiveX Designer: Logon failed..."

I've been racking my brain trying to think of what could have affected it. I haven't touched the code that does the printing or anything that seems like it would be the cause. But, obviously, _something_ changed.

I've tried searching on this error and the threads I've found are all web related. No web here. Just VFP code that calls the PrintOut() method. I don't know what it would be logging on to since I'm accessing Fox 2.x tables to avoid ODBC.

Any suggestions on where to look?

Thanks,

Michelle
 
Anyone? I'm stuck... I can't get this to work. I don't know how to debug an error that's happening inside of the control. Any help would be very appreciated...

Thanks,

Michelle
 
Michelle,

There are two possibilities:

1. CR can no longer find the data. Have you moved any of the DBFs (or associated CDX or FTP) or changed any file names?

2. The data is opened exclusively in VFP. To check that, try issuing a CLOSE DATA and CLOSE TABLES just before you open the report object. (Or, is it possible that some other user has opened the DBF exclusively?)

If that doesn't get you anywhere, come back.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Thanks for the reply, but I don't think it's the data. Nothing has moved and the report works just fine from within Crystal. I'm also started getting a class not registered error on the preview form in VFP at the same time as the other error. I'm wondering if the DLL got corrupt somehow? I've tried re-registering it and it hasn't helped. Unless anyone has another idea, I'm going to try re-installing Crystal.

Thanks,

Michelle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top