>Hi All
>I'm trying to distribute an application that uses the Crystal Reports RDC. My app creates a table in a local drive ( i.e C:\REPDATA ), and i created a File DSN to this table, which is the data source for CR. It all goes well in the developement machine, but when i try to run this on another machine ( of course, after copying the DSN file to the new machine, as well as all DLLs and registrations needed by CR ), the CR Viewer keeps erroring "Data Source not found". What is the best way to define a data source for CR reports, and the best way to implement it for distribution?
>
>Thanks
>Jaime
Jaime,
I remember your earlier post about getting the RDC to work - glad to see that you got that going. :)
In general, Crystal likes to use the exact DSN name that was used to create the report. That means if, for example, you created the report to use a free-table VFP ODBC DSN named "Report Source", you cannot expect the report to work on another machine with a DSN named "ReportSource".
It is possible at runtime to change the DSN associated with each table on the report by making use of the
SetLogonInfo method of each table object, passing it the name of the DSN to use.
From a distribution standpoint, I use InstallShield to install our application at our client site. Through IS, I'm installing the core ODBC components and also instructing it as to which DSN's to create at installation time.
Hope this is helpful.
Laterness,
Jon
Jon Rosenbaum
Devcon Drummer