Working with PRTF fields

Select the record you want to edit in the list of Included records so that it is displayed in the design area. From the Palette, select the field or constant that you want to add. Click the design area at the location where you want the field to reside, or use drag and drop. Text constants are created and then immediately placed into edit mode, so that you can type in the desired text. The field will also automatically expand if you type more characters than the default field can hold.

To modify the text of a text constant later, you can either change it on the Source page or select the field in the design area and then click it on it to put it into edit mode. The field will again automatically expand as you type. To move an existing field to a different location, select it in the design area and drag it to the new location. While you are dragging the field, a pop-up tells you the current row and column number.

Adding a database reference field can also be accomplished using drag and drop. In the Remote Systems view, select the database file where the field is defined, right-click the file and from the pop-up menu select Show in Table > Fields. This will display the Field Table view and populate it with the database fields. You can now select a field in the field table, drag it into the design area and drop it to create a database reference field.

When moving a field within a relative record of a printer file, Report Designer adjusts the SKIP and SPACE keywords of that field and other fields within the record and potentially the record itself. The record bounds remain unchanged and the position of all other fields remain unchanged. The target field now appears where it was moved to by the user. If possible, only the SKIP and SPACE keywords of the field itself are adjusted. If the field is moved into the area occupied by the record's SKIP and SPACE keywords, then those record-level keywords are changed as well. If the field is moved before or after other fields in the same record, the order within the DDS source changes accordingly and the SKIP and SPACE keywords of other fields are also adjusted if necessary.

Note that moving the field back to its original location will not always result in the exact same DDS source code as before. While the field visually appears at the same location, the arrangement of SKIP and SPACE keywords within that record can be different. If it is important to restore the DDS to the exact same keywords, use the workbench Edit menu and select Undo.

If a field in a relative record is moved beyond the area that its record occupies, Report Designer expands the current record to include the moved field. Here is an example: Report1 contains RECORD1 and RECORD2. RECORD1 occupies the first lines of the report followed by RECORD2. RECORD2 starts at column 77 on line 5. RECORD2 contains two fields, FIELD1 and FIELD2. FIELD1 is located on column 90 on line 5, FIELD2 two lines below at column 90 on line 7. The relative distance between FIELD1 and FIELD2 is therefore two lines.

Original location of the two relative records and the two fields of the second record

You now move FIELD1 away from FIELD2 to column 90 of line 2. This increases the distance between FIELD1 and FIELD2 by three lines. Since line 2 is occupied by RECORD1, FIELD1 and all other fields of RECORD2 need to be moved down, so that FIELD1 is again located in the space occupied by RECORD2. So, after the move FIELD1 resides at column 90 on line 5 and FIELD2 on column 90 on line 10.

Final location of the fields in RECORD2 after the move

Feedback