First, I suggest that you use the RDC instead of the CRPE. You have more control over Crystal. Also, Crystal Decisions recommends using the RDC.
The article on my web site will show you how to use the RDC and change the data source location at runtime.
>i'm trying to use de Crystal Report to print some reports in VFP, but i need to change the server, database and table name at runtime.
>
>*** This Code create a Crystal Report Engine object
>
>loCrystal = CREATEOBJECT('Crystal.CRPE.Application')
>loReport = loCrystal.OpenReport(lcReport,1)
>
>****I try to use. No work and i need help
>loCrystal.LogOnServer("pdsodbc", "MSSDE", "IfmGest001002", "sa", "" )
>loDatabase.Tables(1).SetLogOnInfo "pdssql.dll", "MSSDE", "IfmGest001002","sa")
>
>loReport.PrintOut(.T.,1,.F.,1,1)
>
>How can i do it?
>Please Help
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer