Logon failed. Details: ADO Error Code: 0x800300fb Source: Microsoft OLE DB Service Components Description: the file is not a valid compound file.The Fox code is:-
* PreViewForm.Init() LPARAMETERS pnDatabase, pcCompanyID * Simple test to see if we can pass Database location and record ID as parameters to Crystal this.oCrystalEngine = CREATEOBJECT("CrystalRuntime.Application") this.oReport = this.oCrystalEngine.OpenReport("C:\CRM_test\Test01.Rpt") * set the data location according to first parameter passed to form loTables = this.oReport.Database.Tables DO CASE CASE pnDatabase=2 * use the USA demo database this.oReport.Database.setdatasource("c:\CRM_DATA\DEMODATA") FOR EACH loTable IN this.oReport.Database.Tables loTable.Location = FORCEPATH(loTable.Location,"c:\CRM_DATA\DEMODATA")+".dbf" ENDFOR CASE pnDatabase=3 * use the FinPlus database this.oReport.Database.setdatasource("c:\CRM_DATA\FINPLUS_LOCAL") FOR EACH loTable IN this.oReport.Database.Tables loTable.Location = FORCEPATH(loTable.Location,"c:\CRM_DATA\FINPLUS_LOCAL")+".dbf" ENDFOR ENDCASE WITH thisform.oleCRViewer .top = 1 .left = 1 .height = thisform.Height - 2 .width = thisform.Width - 2 .reportsource = thisform.oReport .EnablePrintButton = .T. .ViewReport() ENDWITHWhen executing the report in Crystal Designer the Properties of the DataSource are:-
Database Type: OLE DB (ADO) Provider: VFPOLEDB Data Source: c:\CRM_DATA\DEMODATA\crm.dbc User ID: Locale Identifier: 1033 OLE DB Services: -5 Collating Sequence: Machine DSN:Any ideas why I get this error and how to fix it.