Solved

Problem using crystal report with Visual Foxpro Tables.

Posted on 2004-08-26
8
1,636 Views
Last Modified: 2008-02-01
Hi,

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.
0
Comment
Question by:apss
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
0
 
LVL 4

Expert Comment

by:jrmn
Comment Utility
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:

CrystalReportsSample
http://fox.wikis.com/wc.dll?Wiki~CrystalReportsSample~VFP

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)
http://www.hentzenwerke.com/catalogpricelists/crysdeve.htm

CrysDev: A Developer's Guide to Integrating Crystal Reports (Printed copy)
http://www.hentzenwerke.com/catalogpricelists/crysdev.htm

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

www.ml-consult.demon.co.uk
www.craigberntson.com


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.

http://support.businessobjects.com/communityCS/FilesAndUpdates/scr8_vfp_rdc_param_value.exe.asp

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.

http://support.businessobjects.com/communityCS/FilesAndUpdates/scr8_vfp_rdc_export.exe.asp

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.

http://support.businessobjects.com/communityCS/FilesAndUpdates/scr8_vfp_rdc_preview.exe.asp


Additionally and for added information, please visit this site:

http://www.tek-tips.com - after you register (for FREE), go to the Visual FoxPro area and post your crystal reports questions. If you are familiar with Universal Thread (http://www.universalthread.com/), 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 site...so please try.


Goodluck,
jrmn
0
 
LVL 1

Author Comment

by:apss
Comment Utility
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.

apss
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 1

Author Comment

by:apss
Comment Utility
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.

Thanks
apss
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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.

http://support.businessobjects.com/communityCS/FilesAndUpdates/SCR8_VB_RDC_DBPassword.exe.asp

mlmcc
0
 
LVL 1

Author Comment

by:apss
Comment Utility
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.
apss
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
Comment Utility
PAQed, with points refunded (500)

Computer101
E-E Admin
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now