Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem using crystal report with Visual Foxpro Tables.

Posted on 2004-08-26
8
Medium Priority
?
1,809 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
7 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 11903176
0
 
LVL 4

Expert Comment

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

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
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.

apss
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

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

Thanks
apss
0
 
LVL 101

Expert Comment

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

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

mlmcc
0
 
LVL 1

Author Comment

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

Accepted Solution

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

Computer101
E-E Admin
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

782 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