Creating a report template layout with tables

Tables are used to create the layout of the report template. The rows and columns create the table cells where the report data can be placed. You will add the fields, captions, and legends from the report to these table cells.

Each report field, caption, and legend value should be in its own table cell. For example, the following illustration shows a caption and a report field in the page header table of a report template. Notice how each is placed in its own table cell.

[spacer]

Page header and page footer tables

The page header and page footer tables, located in the header and footer of the Microsoft Word report template document, contain the values that come from the ReportHeader section and ReportFooter section of the report definition. Things like the report date and current user are included in these tables. A typical page header table is shown in the following illustration.

[spacer]

Report header and report footer tables

The report header and report footer tables, located at the beginning and end of the Microsoft Word report template document, contain values from the ReportHeader and ReportFooter section of the report definition. Values that are displayed only one time, such as sorting criteria, are placed in this table. A simple report header table is shown in the following illustration.

[spacer]

Body table

The body table is located between the report header and report footer tables in the Microsoft Word report template document. It contains values from the Body section, and from any additional header and additional footer sections of the report definition.

The body table has multiple rows. The table has one row for the actual report body. There is also one row for each additional header and one row for each additional footer. There can also be a rows that are used for captions, such as column headers.

Typically, additional tables are used within the rows of the body table to create the layout for the row.


A basic body table is shown in the following illustration. The first row in this body table contains captions for the column headings. The next row contains data for an additional header. The third row contains data from the report body. The last row contains data for an additional footer.

[spacer]

The row of the body table that contains items from the report body must have a special Microsoft Word bookmark that the template processing engine in Microsoft Dynamics GP uses to identify this row. You can see this bookmark located on the left side of the body row in the previous illustration. Refer to Bookmarks for details about adding bookmarks to the report template document.

As Microsoft Dynamics GP processes the report, it examines the report data to determine when the rows from the body table are included in the generated output for the report. For example, when the data for an additional header is encountered for a report, that row is included in the generated output.

If the body table contains a row with column headers, this row of the body table should be set to repeat as the header row at the top of each page. This is a Microsoft Word feature that is applied to a specific row of the body table.


Documentation Feedback