Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Problem using crystal report with Visual Foxpro Tables.

Posted on 2004-08-26
Medium Priority
Last Modified: 2008-02-01

I have an application in VB which accesses data from a Visual Foxpro Table ( NAMES.DBF )  using Microsoft Remote Data Control (MSRDC). The application displays a list of names from which the user has to select one. Next I have a report created with crystal RDC which has the same foxpro table (NAMES.DBF) + a linked table (DETAILS.DBF) as data source . Both the Remote Data Control and the Report use DSN less ( connection string based ) ODBC connections. This report displays the details associated with the selected name. My problems are:

1) This arrangement works fine for the first 10 records in the NAMES.DBF table, but if I select
    the 11th name or any name with record position > 10 , the report goes blank and does not display
    the name or any associated details. Is it due to the two concurrent connections (MSRDC & Report)
    to the same table ?

2) When I click on the 'Print' button in CRViewer91 toolbar, It gives an error: " There is not enough
    memory for this operation "  although the 'Export' button works perfectly fine.

3) Since the application is to be distributed, the location of these tables may depend on end user.
    So , instead of hardcoding the data source location, I need it to be specified by the user at
    runtime and changes being automatically made to the data source properties of the MSRDC and
    Crystal Report . While I have found a way of doing so for the Remote Data Control, I dont know
    how to do this for crystal report.

Since I have no knowledge of Visual Foxpro and am a beginner in VB and Crystal Reports, I shall appreciate all your suggestions along with the solutions to my problems. Thanks.
Question by:apss
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 101

Expert Comment

ID: 11903176

Expert Comment

ID: 11908795
Hi apss,

To get you started, I thought I'd try to feed you some places to look on Crystal Reports and VFP.
As of this writing, CR don't have anything specific for Visual Foxpro.
Most training and documentation (as far as I know) is focused on platforms they are strongly supporting which sad to say, VFP is not one of these.

You may find the following of value:


Also, there is a fairly new book out on the topic if you want to get totally immersed.  You can order it online and download the e-book for immediate use, if you're really in a hurry.

CrysDev: A Developer's Guide to Integrating Crystal Reports (ebook only)

CrysDev: A Developer's Guide to Integrating Crystal Reports (Printed copy)

Below are Crystal Reports VFP implementation experts sites. Feel free to visit here to get additional information.

Businees Objects do have a few samples of using the RDC in Fox Pro, Please see some sample applications below :

1.This Microsoft Visual FoxPro 6 Application uses the Report Designer Component (RDC) to demonstrate passing a parameter value to a report at runtime. This sample application is for use with Crystal Reports 8 and higher.

2.This Microsoft Visual FoxPro 6 application uses the Report Designer Component (RDC) to demonstrate exporting a report at runtime (without previewing or an export dialog box). This sample application is for use with Crystal Reports 8 and higher.

3.This Microsoft Visual FoxPro 6 Application uses the Report Designer Component (RDC) to demonstrate previewing a report. This sample application is for use with Crystal Reports 8 and higher.

Additionally and for added information, please visit this site: - after you register (for FREE), go to the Visual FoxPro area and post your crystal reports questions. If you are familiar with Universal Thread (, which most VFP programmers believed to be the best source of VFP resources, most of the top experts here who are really good in crystal reports implementation with VFP are also experts on Tek-Tips. I'm sure one of these guys can help you out with you crystal-VFP question. I have a friend who is a VFP programmer and he strongly recommended this please try.


Author Comment

ID: 11932893
Hi Folks,

Sorry for the delay and thanks a lot for all the help. I will get back to you soon after checking out all the links provided by you.  Thanks again.

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


Author Comment

ID: 11933718
Hi ,

I have checked all the links provided by you people. All the examples provide help on using crystal reports with Visual Foxpro which uses an Access Database ( xtreme.mdb ) as data source. My problem is alltogether different. I need to use crystal reports with Visual Basic  which has Visual Foxpro Tables ( *.DBF ) as datasource. My project has nothing do with VFP programming except for the fact that the VFP tables have been used as data source. It is very easy to integrate crystal reports with MS Access databases since crystal reports seem to be tailor made just for access databases. Although I have managed to connect crystal reports with VFP tables and have successfuly displayed data from these tables, but all of my problems begin after this stage. It would be a great help if you could provide information relating to my project setup i.e.  :-

Visual Basic + Crystal Reports + Visual Foxpro Tables

In the meantime I will check on the VFP forum suggested by jrmn.

LVL 101

Expert Comment

ID: 11938129
Look at this one.  I realize it is for an Access database but the principle is the same for a FoxPro database.  Crystal doesn't provide VB with Foxpro database examples.


Author Comment

ID: 11960948
Hi guys,

Well I have tried the link posted by mlmcc but it does not seem to work. When I try to specify the table location, as mentioned in the example ( .Table(1).Location = path ) , it give an error "Missing DSN String". Since I am using a DSN less ODBC connection to the foxpro tables, crystal reports doesn't support change of table locations in a DSN less ODBC connection. Anyway, I have figured out the solution to my problems:

1) As for the first problem, it was due to the link between the two tables which I changed from an Inner Join to Left
    Outer Join and the problem was resolved.

2) The second problem was due to simultaneous connections to the same table by the Microsoft Remote Data Controls
    used in the application and by the ODBC connections used by crystal reports. This was resolved by creating a
    DataEnvironment in the project and connections for the application and crystal reports to the foxpro tables are
    through this DataEnvironment. Now there are no memory problems.

3) I just changed the table location in the connection string of DataEnvironment and it worked for both the application
    and crystal report. Earlier I had to do it separately for all the Remote Data Controls and for the crystal report.

Anyway, thanks a lot for your help.

Accepted Solution

Computer101 earned 0 total points
ID: 12185880
PAQed, with points refunded (500)

E-E Admin

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question