Add Related Field to Report
This section describes how to add one or more related fields to a report. The difference between a field and a related field is that with a related field, you are referencing a field value in a report that is not included in the corresponding report table by default. This description illustrates how to add the Salesperson Code field to the report and reference the field value/information associated with this code from another table instead of the value (for example DH). For example, this could be the salesperson's name, the salesperson's specific phone number and/or the salesperson's email address.
To add a related field to a report, proceed as follows:
- Open the search function from the role center (ALT+Q).
- Search for Report Setups and click on the corresponding search result.
- The Report Setups page is displayed.
- Select the corresponding report in the list and click on the value under the ID column in the report line.
- The report card is displayed.
- Under the Fields tab, select the layout area to which you want to add the related field. In the following illustration, you can identify the individual areas by number.
- 1: Top Left: This layout area is located at the top left of the report and is primarily used as the address area. For more information on setting the address, please refer to the section Edit Report Address Format.
- 2: Top Right: This layout area is located at the top right of the report and is primarily used to display additional information relevant to the report.
- 3: Top: This layout area is located in the report below the address area and the report information.
- 4: Top Columns: This layout area is located in the report above the column headers for the report lines.
- 5: Before Lines: This layout area is located before all report lines.
- 6: Before Line: This layout area is located before each report line. Please note that this layout area is repeated per line.
- 7: After Line: This layout area is located after each report line. Please note that this layout area is repeated per line.
- 8: After Lines: This layout area is located after all report lines.
- 9: Bottom: This layout area is located at the bottom of the report.
Other selectable areas such as Line, Totals and VAT Specification are reserved by the system and cannot be edited. If you want to hide the VAT Specification report area, you will find the corresponding setting in the Define Print Settings section.
- In our example, we select the layout area Top Right (2).
- Click on the Add Related Fields option under the Fields section in the menu bar.
- The Field Lookup window is displayed.
- From the list of available related fields, select the field you want to add to the report. In our example, we add the related field Salesperson Code (ID: 43). You can use the search to find corresponding fields from the list.
- Confirm the selection with OK.
- The Salesperson Code field is added in the Top Right (2) list area of the report. Note that the table ID in this case is not 36 (ID for the Sales Header table) but 13 (ID for the Salesperson/Purchaser table).
- Click on the value under the No. column and select the ellipsis (…).
- The Fields Lookup window is displayed.
- Select the value Name (ID: 2). This defines that you want to add the value of the linked field Name from the table 13 (Salesperson/Purchaser) to the report for the field value Salesperson Code.
- The line for the related field is updated to the list area of the report setup and displays the corresponding selection. You can use the adjacent Conditions column to define conditions under which this field is printed (for example, that the related fields or fields in general should only be printed in the report if a certain condition is met). Further information on this can be found in the section Define Condition for Field.
- You have added a related field to the report. In the corresponding line under the Fields section, you will find additional settings for formatting the field and the field value.
[!INOTE]
Please note that changes to the formatting in the Fields area override the general print settings, i.e. if you make a change to the Font, Font size, Print Bold and Alignment columns for this line, this will only affect this line. - To add the phone number of the corresponding salesperson in the report in the same way, click on the Add Related Fields option in the menu bar.
- In the Fields Lookup window, select the Salesperson Code field (ID: 43). You can use the search function to find the field more quickly in the list.
- Click OK to add the field to the list.
- Under the newly added line, click on the Fields tab in the No. column and change the value to 5053 (Field: Phone No.).
- To add the email address of the corresponding salesperson in the report in the same way, click on the Add Linked Fields option in the menu bar.
- In the Fields Lookup window, select the Salesperson Code field (ID: 43). You can use the search function to find the field more quickly in the list.
- Click OK to add the field to the list.
- Under the newly added line under the Fields tab, click in the No. column and change the value to 5052 (Field: Email).
[!INOTE]
Please note that fields are only printed in the report if they have a field value. If fields that you add do not have a field value, they will not be printed in the report. If the field with the field value is not printed, you must maintain the data and enter a field value.
You have included the salesperson's name, e-mail address and telephone number in the report.
For more information on how to change the field caption in a report, for example, see the section Change Field Caption.