Page 1 of 1

listing with 3 independed files

Posted: Tue Mar 10, 2009 5:36 am
by Nevzat_Kanbur_(Guest)
Hi,__I want to show 3 different .dbf files in one report without using any relation.____As I know R&R requires second file opened must be related to one.____Any help please?____regards__Nevzat__

=> RE: listing with 3 independed files

Posted: Tue Mar 10, 2009 10:59 am
by Chris_Strasser_(Guest)
It^s true that you have to relate tables to each other in order to have more than one in your report. But there^s nothing that says the relations have to make sense. For instance, say you want to create a report which includes investors ("inv"), employees ("emp") and customers ("cus") together. Most will have nothing in common (although some may overlap), so there^s no easy way to link them together.____The trick is to use another file as a starting point and restrict that file to a single record through the selection criteria (if you can find an actual single record file, it^s even better). Say this file is called "company". You^d make this your master table____Then you create a constant-value character field, for example "LinkAll" with the value "ALL" which gets assigned to the master table.____You use this field to link into each of your other tables, using a FlexLink index also set to the constant value "ALL". This link should be a "scan" to ensure that all the records in the table are read / returned.____It works faster if you can control the indexes in the target tables or find something that would work in the same fashion as described above (for instance, your company table has a field called COMPCODE with a value of "IBM" and each of the files you want to link into also have a COMPCODE field with a single value, "IBM" as well).____Note that all three don^t need to use the same linking, just something that makes sure that the master table finds all the records in the target through a scan join.