Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal 8.5 questions....
Message
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00668687
Message ID:
00668696
Views:
24
You can't report off VFP databases without using the ODBC driver, thus a DSN on each machine. However, the copy files to FOX2X type method works quite well - all data selection can be done in VFP, the report then simply displays the fields with no processing. The way I did this was to handle the select logic in VFP and copy the resulting cursor to a FOX2X table in a temp directory. Each workstation has the same temp directory structure so the report runs on any machine. By doing this, the same report can be used for production or test data, it doesn't matter - the report generates from the temporary file, the contents of which are controlled by the VFP app, so that is where you decide to pull from production or development.
If you use the ODBC driver, you CAN programmatically change which DSN is being used. Look at the LogOnServer and SetLogOnInfo methods in the RDC. You can create the report using an ODBC datasource pointing to development data, but in the production app point the datasource to the production DSN when calling the report.

HTH,
Randy

>Hi folks!
>
>Here at work, I've been asked to get some info on some problems we are experiencing here trying to use Crystal Reports 8.5 with Visual Foxpro 6.0.
>
>Here is a quote of the email I received from a co-worker....
>
>************************************************************************************
>Here's another thing you could look at. In ****** we're using Crystal Reports for some of the reports.
>
>We had issues with using FoxPro 6.0 tables, so I had to copy the table to Fox 2.6. And, it didn't allow me to send variables to the report, even though it looked like it should have been able to, so the data path is hard coded in the reports. We can't test in development with development data and we can't use the same report format for current and history reports.
>
>***** and ****** did some research into this and sent me this email, but I've not had a chance to follow up. It would be great if you could look into this and solve how we can send 6.0 data to these reports and change the path and/or datafile name programically. The Crystal object is already in the reports.scx and there is code in the method reports.printwhere() (I think) that you can refer to. You'll see that we can have Crystal and Foxpro reports in our app by using a field in repolist.dbf.
>*************************************************************************************
>
>So the questions are....
>1). Can we run the reports in 6.0 databases without having to set up a DSN on every PC in the company...
>
>2). Can we send variables to the reports (like database, path, etc....) and make the report run in production and/or developement data?
>
>Tommy (you can tell I'm not an expert on this tool!!!)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform