When you query data using OLE-DB, you get an ADO Recordset as the result. You can then pass the recordset to Crystal Reports. I explain how to do this in the book. If you don't have a good understanding of OLE-DB/ADO, look at
http://msdn.microsoft.com/library/en-us/dnfoxgen/html/adojump.asp.
>Hello All,
>
>I have a report where I have the Datasource defined as
>VFPOLEDB.1 with a Location of c:\Test\Data\vfpdata.dbc
>
>The report contains the Record & Group Filtering we need.
>Parameters are set when the user runs the report from within the report itself.
>
>I would like to call this from VFP, but I am unsure as to what
>OLDDB Setting I need to Modify / Update at runtime to tell
>it the Database Location...
>
>I thought that doing:
>
>oConn = CREATEOBJECT("ADODB.Connection")
>oConn.ConnectionString = "Provider=VFPOLEDB.1;Data Source=c:\Test\Data\vfpdata.dbc;Password=''"
>oConn.OPEN()
>
>I am missing something... It seems I need an Object to contain
>a Query?? as in the following from Craigs Most Excellent Book:
>
>oRS = CREATEOBJECT("ADODB.RecordSet")
>oRS.Open("Select * FROM Customer", oConn)
>
>But I basically want VFP to just run the report and the do the
>processing itself...
>
>Can anyone tell me how I would do this?? Or do I need to move the
>Crystal Reports Record Selection Criteria out to VFP and run the
>Query before calling the VFP Report??
>
>Thanks!
>Bob
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer