Selecting a file to read
The Files to read function enables you to choose the files from which your report will get its data. Select Design > Files to read. If you’re creating a new report, two lists are displayed.
- The Files to Read list is the large list in the center of the screen. For a new report, this list is empty.
- The Available Files list is displayed on the right side of the screen. As you select files from this list, they display in the Files to Read list. (See figure 1.)
If you’re working on an existing report, Select File functions > Add file. You can add additional files that related to the primary file. See step 3 below.
|
By default, the Available Files list displays the file description. To display the file definition name instead, select List > Toggle view. Select Toggle view again to display the description. |
1. | Select the first file you want ReportWriter to read. You must select files in the order you want ReportWriter to read them. The first file you select is the primary file. The primary file determines which additional files can be read, as well as which fields are available for inclusion in your report. |
2. | If more than one structure is assigned to the selected file, an Available Structures list is displayed. Select a structure from the list. The selected structure determines how ReportWriter views the data in the file. If a structure tag was defined in the repository, ReportWriter filters out the records that meet the tag criteria. |
The selected file is displayed in the Files to Read list in this format:
file_description.structure_description
3. | To add additional files to the Files to Read list, select File functions > Add file. |
The Available Files list displays files that are related to the primary file. ReportWriter processes other files based on what it finds in the primary file.
For example, if the first file we select is a sales order management file and the second file is a customer master file, ReportWriter will read each sales order entry and then look for the associated entry in the customer master file. If the sales order file has more than one entry for each customer, our report will contain the same customer twice. On the other hand, if we select the customer master file first, ReportWriter will read each name and then look for the associated entries in the sales order management file.
4. | Select the next file you want ReportWriter to read from the Available Files list. |
When you select a secondary file, it too can have multiple structures assigned to it, and you may need to select the one you want. In addition, if the structure selected (explicitly or implicitly) is used in more than one relation between it and the structure of the related file (currently highlighted in the Files to Read list), the Available Relations list is displayed. (See figure 2.)
|
This list provides the “from” and “to” keys involved in the available relations. (You can view additional information about these keys to help you make your selection. See Examining a relationship between files.) Select the desired relation. It is displayed in the Files to Read list in this format:
file_description.structure_description.to_key
5. | Continue to add files that you want in your report. |
The file that is highlighted in the Files to Read list when you select Add file determines which available files are displayed.
The number of the file to which a file is related is shown in the PARENT column. For example, if file #1 was highlighted when you selected Add file, a number 1 appears in the PARENT column for the added file. To examine this relationship in more detail, see Examining a relationship between files.
Let’s assume that our primary file is the Customer master file. The files available from the Customer master file might be Employee master file, Operator master file, Customer wish list, and Sls order management. Let’s say we also selected the Sls order management file to be read. If we highlighted the Sls order management file and selected Add file, the Available Files list would now contain the files that are available from the Sls order management file.
6. | When you’re finished selecting files, press the Exit shortcut from the Files to Read list. |