| Reports |  |
| Reports are used to print data to the screen, to a printer or to another output device. Reports are used in (print) sessions and in SQL queries: A session can have multiple reports. If more than one report is defined you are usually presented with a list of reports that are available in the session. An SQL query can have one report at most. Example You are responsible for general item data. You need to generate list of all items. You start the Print Items - General (tcibd0401m000) session. Print Items - General (Selections tab) When you print the Items - General report, you will see that the session uses three reports: Items - General (Details) Items - General (Summary) Items - General (General) Print Items - General – Select Report When you select the Items - General (Summary) report, the following report is printed: Items - General (Summary) report printed to screen Report structure ERP LN reports contain one or more of the following layouts:
Layout | Description
Before.report | Layouts of this type are printed once at the beginning of the report. This layout can be used to present information about the report. For example, the title page of the report.
Header | Header layouts are printed at the top of every page.
Before.field | You can define this layout for each input field for which a Sort Mode is defined in the Report Input Fields (ttadv3532m000) session. Each time the value of the sorted input field changes, this layout is printed before the Detail lines. In this way the records are grouped. If a group of records spans more than one page, the before.field layout is repeated at the top of the new page (following the header).
Detail | Detail layouts are used for the individual records included in the body of the report. They are printed every time that data is sent to the report.
After.field | You can define this layout for each input field for which a Sort Mode is defined in the Report Input Fields (ttadv3532m000) session. Each time the value of the sorted input field changes, the layout is printed after the detail lines. In this layout, the presorted input field still contains the old value. This layout, for example, can be used to print totals for a particular group of detail lines.
Footer | Footer layouts are printed at the bottom of each page. This layout is used to print: Titles Page numbers Page totals
After.report | This layout is only printed at the end of the report, and after all other layouts. If this layout does not fill a complete page, the footer layout will be printed at the bottom of the page, where the After.report layout(s) is printed.
The contents and layouts of reports are defined in the data dictionary. In addition, you can link a report script to a report. In a report script, you can program actions that you want to be performed at particular stages of the report execution. For example, you can create a script to perform calculations on the report data or to read records from related tables that are not automatically available to the report. You program report scripts in the same way as you program 4GL program scripts, except that report scripts use different event sections and some special functions. To create reports You can create reports in the Reports (ttadv3530m000) session and in the Report Generator (ttadv3130s100) session. You can start these sessions from the Sessions (ttadv2500m000) session and from the Sessions (ttadv2100s000) session respectively. You can change the report layout in the Report Editor that is part of Development Tools. For details, refer to To create reports. For more information, refer to the following topics in the Web Help: Reports Overview |