Input Fields tab

Use this tab to maintain the input fields of the report.

The input fields are used to specify the table fields or program scripts whose values must appear in the report. All variables used in the report must be defined as input fields.

Note: The variables in the program script must be declared as 'extern' on the program script from which the report is called.

The tab displays a list of all the input fields of the current report.

In the Input Fields list, you can add or remove input fields and change their sort mode. You can insert all fields of a table definition using the Copy Fields from DD command.

To determine the sort sequence, change the order of the input fields by moving them up or down the list.

When changing the field order, the following constraints prevail:

  • You can only change the sort sequence of the sorted input fields (with the sort mode equal to Presorted, Ascending or Descending).
  • The options to change the field order are disabled for non-sorted fields (with the sort mode equal to No sorting).
  • Sorted fields always precede non-sorted fields.

For more information, see Input Field shortcut menu.

Add and remove input fields

To add an input field:

  1. Click Add. Alternatively, right-click in the Input Fields list and, on the shortcut menu, select Add.
  2. Specify the Field Name of the new input field. Specify either the name of an external variable of the report script, or the name of a table field. To select a table field, press Ctrl+Space. In the select dialog box, choose a table and a field.

  3. Specify the Depth (only non-table fields).
  4. Specify the field Domain (only non-table fields). Press Ctrl+Space and select a domain from the development repository.
  5. When you finished adding input fields, refresh the Input Fields list, so the new fields are displayed at the appropriate positions. Right-click in the Input Fields list and, on the shortcut menu, select Refresh.

For details, see the field help.

To remove an input field, right-click an input field and, on the shortcut menu, select Remove. Then, right-click in the Input Fields list and, on the shortcut menu, select Refresh.

Sort mode

The icon in front of the field name indicates the sort mode of the input field. The following icons are used:

No sorting
Ascending
Descending
Presorted

If at least one input field of a report has sort mode Ascending or Descending, the report will sort the sent data before printing it. If you are sure the sent data is presorted, use sort mode Presorted, because the sort by the report is time-consuming.

Sorted fields must have a Depth of 0 or 1, and non-sorted fields can have greater depth values. If you change the Depth of a sorted field to a value greater than 1, the sort mode of the field automatically changes to No sorting. This means that the sorted field becomes a non-sorted field.

Note: Only input variables, with sort mode unequal to No sorting, can be used as sorted fields in a report layout of type Before.field or After.field.

Sort sequence

The position of a field in the Input Fields list determines the sort sequence. The field at the top of the list has sort sequence 1, the second field has sort sequence 2, and so on.

When you print a report, the sent data is sorted first on the input field with sort sequence 1, then on the input field with sort sequence 2, and so on.

For example, if you want to sort addresses first by city and then by street, place city at the top of the list (sort sequence 1) and street on the second position in the list (sort sequence 2).

To move fields up and down the list, use Up and Down.

Note: 
  • You can only move fields with sort mode Ascending, Descending, or Presorted. Non-sorted fields have sort sequence 99 and are always displayed at the bottom of the list.
  • The sort sequence number is not displayed in the Input Fields list. To view this number, go to the editor's TDE Documentation tab. If this tab is not displayed, enable the corresponding preference setting in the Preferences - Multipage dialog box and restart the Report Editor.
Input Fields
Field Name
The name of the variable sent by the program script to the report. This variable can be a table field (like maitm001.item). It can be a variable defined in your program script. This variable must be a global defined variable, type 'extern'.
Allowed values:

In the report editor, this field is read-only. You can only set the field name when you add a new input field. For details, see the Add command in the Input Field shortcut menu.

Depth
When the report input variable is an array, this field contains the depth of the array. If the report input variable is a table field, you cannot change its depth.

If the depth of a field is greater than 1, the field cannot be a sorted field (with sort mode equal to Ascending, Descending or Presorted).

Allowed values:

If the input field is a table field, the depth of the field is determined by the table definition. Therefore, for table fields, you cannot change the depth of the field and the depth value is read-only.

If the input field is not a table field and defined as a variable in the report script, you can change its depth to any whole number in the range of 0 - 99.

Note: 
  • You cannot change the depth of a table field.
  • Field depths greater than 1 only apply to non-sorted input fields.

    Therefore, for input fields with a depth greater than 1, the Sort Mode command is not available. When you set the depth of a sorted field to a value greater than 1, the sort mode of this input field automatically changes to No sorting, and the field becomes a non-sorted field.

Domain
The domain of the report input field.

Only applicable for non-table fields.

Allowed values:

For non-table fields, specify a Domain for the new input field. Select one of the domains available on the current LN server. Press Ctrl+Space and select a domain from the development repository.

For table fields, the Domain of the field is determined by the table definition. You cannot change this field domain here.

Note: To edit the domain, click the icon behind the domain name.

Input Field shortcut menu

Add
Adds a new input field record to the Input Fields list.
See Add and remove input fields.
Remove
Removes the selected input field record from the Input Fields list.
Up
Moves the selected input field up one position in the sort sequence (and in the Input Fields list). This command only applies to input fields with a sort mode equal to Presorted, Descending, or Ascending.
Down
Moves the selected input field down one position in the sort sequence (and in the Input Fields list). This command only applies to input fields with a sort mode equal to Presorted, Descending, or Ascending.
Refresh
Refreshes the Input Fields list, so new fields are displayed at the appropriate positions and have the correct sort sequence assigned. Use this command after you add or remove fields.
Copy Fields from DD
Inserts all table fields of the selected table definition. This table definition must be available on the current LN server.

This command opens a dialog box that shows all table definitions of the current package. To navigate through the table definitions available on the server, use the browse and search facilities of the dialog box. To insert all fields of a table in the Input Fields field, select a table definition and click OK.

No / Ascending / Descending / Presorted
Sets the sort mode of the selected input field.

This command does not apply to input fields with a Depth greater than 1. Such depth fields are always non-sorted (with sort mode equal to No sorting).