Page 1 of 1
R&R v8.0 and Scan Relationships
Posted: Fri May 04, 2001 2:07 pm
by Kevin_Roberts_(Guest)
Does version 8.0 have a problem with scan relationship? I^ve set up the relationship correctly as far as I can tell, and as a test I am trying to print out a simple report based on a scan relationship.____Table A is the master table with a Company_ID field as the primary key.____Table B is the "detail" table consisting of zero or more records with a Company_ID field in each record.____I have a scan relationship set up so that each record from table A is printed should match up with one or more records from table B.____After setting up the relation in R&R. The record line of my test reports consists of one field from the master table A followed by one field from the detail table B on the same report line. When I print out the report, I see the field values from the master table, but the field values from the detail table are all blank.____I^ve looked over this in detail for several hours and cannot figure out why it does not work. Is there some simple thing new users typically overlook when trying to print such scan reports?____Grateful for any help.____Regards.____Kevin__
=> RE: R&R v8.0 and Scan Relationships
Posted: Fri May 04, 2001 2:10 pm
by kfleming
What is the index key expression for the related file?__Do you have correct index/tag selected?______Kathleen __R&R Support
==> RE: R&R v8.0 and Scan Relationships
Posted: Fri May 04, 2001 2:58 pm
by Kevin_Roberts_(Guest)
Utimately, I want to set up a one-to-many-to-one relationship among the following three files:____1) BUYER.DBF - contains company records indexed on a Company_ID field.____2) CONTCOMP.DBF - a cross-reference table used to link CONTact records with COMPany records and containing indexed Contact_ID and Company_ID fields.____3) CONTACT.DBF - contains contact records indexed on Contact_ID.____Right now, I just want to set up a one-to-many relationship between BUYER and CONTCOMP and print out a report. Once that it working, the rest will be easy.____After setting up the relationship, the following summary description is created:____scan(Buyer-->COMPANY_ID, Contcomp:COMP_ID, full, blank)____For each Buyer record, use the COMPANY_ID field to scan the matching Contcomp records using the COMP_ID index tag. If no record is found, use one blank Contcomp table record.____COMP_ID is the index tag of CONTCOMP.CDX whose value is the Company_ID field in CONTCOMP.DBF.____When I insert fields into the Record band of the report designer, I drag a fields from the insert dialog composite record. The first field is from the BUYER table, and the second field is from CONTCOMP and which I place next to the field from BUYER on the report band.____When I preview the report, all I get displayed are the field values from BUYER. The field values from CONTCOMP are all blank.____I have verified that the cross reference data actually exists in the tables, and even set up a relation in FoxPro 2.6 to test it out and view the related records.____I am stumped as to why R&R will not display the related table fields in the report.____Regards.____Kevin Roberts__
===> RE: R&R v8.0 and Scan Relationships
Posted: Mon May 07, 2001 10:37 am
by kfleming
Does the report also have a second relation?____If the linking field is a character field, try changing the relation type from exact to partial match and then experiment with changing the number of matching characters.__Maybe the fields are not the same length in both files?____Kathleen__R&R Support
====> RE: R&R v8.0 and Scan Relationships
Posted: Mon May 07, 2001 1:38 pm
by Kevin_Roberts_(Guest)
Hello Kathleen.____I^ve double and triple checked field sizes, types, and even used partial matches, but still cannot see what I am doing wrong. I have a feeling that either a) there is some basic step I have omitted, and which I cannot discern from the online help, or b) version 8.0 does not properly work as I am using it (or maybe it was not meant to!)____I have created a sample data set (two 10-record tables) and a sample report that illustrate my problem. May I send it to you as a zip file (3Kb)?____Kevin__kevin_roberts@hotmail.com__
=====> RE: R&R v8.0 and Scan Relationships
Posted: Tue May 08, 2001 7:04 am
by kfleming
Send the files to kfleming@livewarepub.com and I will have a look.____Kathleen__R&R Support
======> RE: R&R v8.0 and Scan Relationships
Posted: Wed May 09, 2001 10:13 am
by Kevin_Roberts_(Guest)
Kathleen,____Thanks to your help and that of another forum participant I was able to determine that the problem was indeed with the indexes.____Specifically, it seems that Microsoft does not create FoxPro indexes properly! In my case I was using FoxPro 2.6, but I also had problems when I checked it out with Visual FoxPro 6.0 indexes.____FYI, the behavior I described (only displaying master file data in the report) also occurs with Crystal Reports.____When I reindexed the database tables using Vista Software^s Apollo 5.1 product (a VCL component for Delphi applications), everything worked fine in both R&R and Crystal Reports.____Also FYI, I continued to have problems regardless of whether or not my FoxPro 2.6 .CDX file had unique index tags. The common thread was that if FoxPro 2.6 (or 6.0) was used to create the indexes, both R&R and Crytal had problems. If I reindexed the tables with Apollo, my problems went away.____Thanks for your help. I now have an approach that resolves my problem.____Regards.____Kevin Roberts__
=======> RE: R&R v8.0 and Scan Relationships
Posted: Fri Jun 08, 2001 3:50 am
by anfi
__>the problem was indeed with __>the indexes. ____>Specifically, it seems that Microsoft does __>not create FoxPro indexes properly! ____There are many different versions on "CDX" out there.__FoxPro added information to CDX how to collate characters.__I know at least five different vendor of products using CDX and non of them are compatible.____anfi