First, stop using CRPE. It's pronounced "crappy" for a reason. You should be using the COM Automation Server. See the articles at
http://craigberntson.com/papers.htmlSecond, the ODBC driver for VFP is very, very old and wasn't updated after VFP 6.0. Use the OLEDB Provider
Third. Last I checked, Crystal Reports had dropped support for COM automation. The last version that had COM support, XI R2, didn't support Windows 7.
>I have successfully created a Visual FoxPro Tables system DSN for a Windows 7 ODBC connection, using the 32-bit connector in the Syswow64 folder.
>I can populate my reports using that connection, and print them from Crystal.
>
>Here's my Fox code:
>CrysApp = CreateObject("Crystal.CRPE.application")
>CrysReport0 = CrysApp.OpenReport("\\Statement-DS\Statemnt\Admin\Xics\ReportC\Reports\1.rpt")
>CrysReport0.DiscardSavedData
>CrysReport0.Database.Verify
>CrysReport0.SelectPrinter("Adobe PDF Converter","Adobe PDF","Desktop\*.pdf")
>CrysReport0.PrintOut(.F.)
>Release CrysApp
>
>This gives me this error:
>ODBC error:[Microsoft][ODBC Visual FoxPro Driver]SQL: Column 'FIRSTNAME' is not found.
>
>It appears that the report is not able to refresh the data from my Fox tables.
>
>Your help would be greatly appreciated!
>
>Gerry
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer