How to abort printing

Without interference, Oleander will print all records in the main group with all connected group information. To stop printing you should handle one of the AfterPrint events and raise an EOleanderError exception with the oerAbort value as parameter. This exception will be handled by the Oleander Controller and printing will stop. The AfterPrintGroup event is called the least often, while the AfterPrintField event is called the most often. Also it could be necessary to call Application.Processmessages in one of these events, to allow for user interference such as pressing buttons.