Microsoft Dynamics NAV - C/SIDE Solution Development -

Microsoft Dynamics NAV – C/SIDE Solution Development

Locus IT ServicesMicrosoft Dynamics NAV – C/SIDE Solution Development

Lesson 1: Prerequisite Knowledge

Prerequisite Knowledge

Prerequisite Knowledge in Reporting : Before analyzing and implementing the report functionality that is covered in this module, we will review the following  concepts :

  • Report request pages
  • Report triggers
  • Report functions
  • ProcessingOnly reports

Report Request Pages

In Microsoft Dynamics NAV 2013, a report is initialized with a Request Page. A request page runs before a report executes. Request pages enable end-users to specify options and filters for a report.

Report Triggers

Prerequisite Knowledge in Reporting  : Each report object consists of several elements that can contain the following triggers:

  • The report itself
  • One or more data items
  • A Request page that has an optional FastTab for each data item and an optional Options FastTab
  • Columns and Labels that display data

Each of these elements has a fixed number of event triggers that execute during report execution. You must understand the order that some frequently used triggers execute. The following list details the order in which these common event triggers execute:

  1. When a user starts the report, the OnInitReport trigger is called. This is the first trigger that runs. It performs processing that is required before any part of the report can run. If the Request page is needed, the OnInitReport trigger runs before the Request page is displayed. Use the OnInitReport trigger to initialize variables and to populate default values on the Request in Microsoft Dynamics NAV
  2. If the OnInitReport trigger does not end the processing of the report, the Request page for the report runs if it is defined. The user can decide to cancel the report from the Request
  3. If the user continues, the OnPreReport trigger is called. At this point, no data is processed. Similar to the OnInitReport trigger, the OnPreReport trigger ends report processing. Use the OnPreReport trigger to process values that the user entered on the Request
  4. As long as the processing of the report is not ended in the OnPreReport trigger, the data items are processed. Each data item has its own OnPreDataItem, OnAfterGetRecord, and OnPostDataItem
  5. Before any records are retrieved, the OnPreDataItem trigger is called. In the same manner, the OnPostDataItem trigger is called after the last record is processed.
  6. Between the OnPreDataItem trigger and the OnPostDataItem trigger, the records of the data item process. Processing a record means executing the OnAfterGetRecord trigger for each record that the data item retrieves, and outputting the values of the records by using the report’s layout.
  7. If there is an indented data item, a data item run is initiated for this data item and for each record in its parent data item. You can nest data items up to ten levels deep.
  8. When all records are processed in a data item, control returns to the point from which the processing initiates. For an indented data item this is the next record of the data item on the next higher level. If the data item is already on the highest level (indentation is zero), control returns to the report.
  9. After the first data item at indentation level zero processes, the next data item at indentation level zero (if one exists) processes in the same manner.

When there are no more data items, the OnPostReport trigger is called. Use this trigger to do any necessary post processing, for example, cleaning up by removing temporary files.


Locus IT Project Management Office
What’s it?