Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

   In order to make the print management of the report system as flexible as
   possible, a mechanism has been designed that allows to scan and constantly
   synchronise all the files involved in the report. This mechanism, called
   Virtual Record, is open and can be applied to any number of files.

   Thanks to this mechanism, the system treats the report as if it operates
   on a single file, whose record structure is composed of a set of fields of
   all the relationed files.

   A short example will clarify the concept of virtual records. Let's suppose
   to print a list of clients (file Cli) and for each client extract the
   invoices made. Each invoice is made up of a header (InvHd) and many detail
   rows (InvRw). The database of the application has a 1:N relation set
   between the Client file and the Invoice Header file on the Client Code
   field, and a same 1:N relation between the Invoice Header file and the
   Detail Rows file on the field Invoice Code. The virtual record can be seen
   as a record formed by the sum of the fields of the relationed files, thus
   having all the fields of the client's file, followed by all the fields of
   the invoice file, and followed by all the fields of the details file.

   The scanning mechanism of the virtual record allows to move from one
   virtual record to the next, considering the relations of the files
   involved. The first file, the master file (Clients), is positioned on the
   first record and the relationed files are positioned on the first record
   that satisfies the relation criteria. This occurs for all the files
   belonging to the virtual record.

   Once the alignment of the last file being scanned (Invoice Detail Row) has
   been reached, the system activates the printing of all the information
   desired. The system will then position itself on the next virtual record.

   The repositioning is obtained by advancing the record pointer on the last
   file being scanned (in the example InvRw) and verifying that the relation
   condition is still being satisfied. If it is, the data will be printed,
   otherwise the scanning system advances the record pointer on the file at
   the next highest level (in the example InvHd). If the relation criteria of
   this last file are satisfied, the system will search for the first
   matching record at the lower level (again on InvRw). The mechanism is
   repeated until the system reaches the end-of-range situation on the master
   file (in this case the Client file) and aborts printing.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson