General information
Category:
COM/DCOM and OLE Automation
Title:
Crystal Reports Automation Server ODBC error
Here is a copy of my Visual FoxPro 5.0 program…
clea
*Create Crystal Report Writer application object
LCrwApp=Createobject('Crystal.CRPE.Application')
*Create Open report variable
LCrwRep=LCrwApp.OpenReport("\\Dp__NT\Dp_Work\admin\xics\statemnt\fed_sup\Archive\A.rpt")
*Create Database variable
LcrwDat=LCrwRep.Database
*Create Database Table variable
LcrwTab=LcrwDat.Tables
LcrwItem1=LcrwTab.Item(1)
Lname=LcrwItem1.Name
? Lname
LcrwItem1.SetLogOnInfo("Visual FoxPro Tables","repplan")
LB=LcrwItem1.TestConnectivity
? LB
*Create Database Table Item variable Again
LcrwItem2=LcrwTab.Item(2)
Lname=LcrwItem2.Name
? Lname
LcrwItem2.SetLogOnInfo("Visual FoxPro Tables","repsrc")
LB=LcrwItem2.TestConnectivity
? LB
LCrwRep.DiscardSavedData
Lver=LcrwDat.verify
*Create Export Options of the Open report variable
LCrwExp=LCrwRep.ExportOptions
LCrwExp.FormatType=4
LCrwExp.DestinationType=1
LCrwExp.DiskFileName='\\Dp__NT\Dp_Work\admin\xics\statemnt\fed_sup\Archive\CCCrtf.rtf'
LCrwRep.Export(.f.)
The first error message reads: “ODBC error[Microsoft][ODBC Visual FoxPro Driver]SQL: ‘Column ‘Name1’ is not found.”
(Column Name1 is the first field from repplan used in the report)
The second error message immediately following the first reads: “OLE IDispatch exception code 20527 from CPEAUT32:SQL server error”
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only