The RAP compiler attempts compilation of the entire module automatically when any of the following happen:
You load a report.
You select the Calc tab within the Report Designer.
You switch views in the Code Explorer.
It is also possible to compile the currently selected event handler. To do this, right-click over the Code Editor and select Compile from the popup menu. The compiler will check the global sections and any other programs needed to compile the current event handler.