Printing Related Records
Posted: Tue Aug 10, 2004 4:39 am
I have experimented and found out what was causing the problem on printing related records on the same line.____The following is what I am doing:____I have a data file which has two indexes. One, a calculated field comprising of a character "U" followed by the guest number. Second the reservation number. This file can contain both types of records or either one.____I have another file (Main) from which I pick up the guest number, combine it with a "U" through a calculated field, and scan the second file. For each record I find, I accumulate it in another field (as a running total/field) and print it when the calculated field (U+Guest Number)changes. It works perfectly and that is what I want.____For some unknown reason, the designers of the data base have also included some other data in the same file (secondary) which has to be also read by scanning the file using the reservation number picked from the main file.____When I include the second scan everything goes hay wire. It appears that the system does not like the second scan on the same file using different index. Even though I am able to get the correct data for that scan, the calculated field (Printing related records on the same line) gets duplicate values in every read. ____The moment I remove the second scan everything comes back to normal.____I have been breaking my head over this for the past couple of days. I have gone thru your discussion forum in depth and have not come across an answer.____Kathleen, I would like you to help me out on this.____Thanks and Regards__