| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ReportManager Class > ReportManager Methods >====== CancelPrintReport (cancel report printing) ====== | [[askpreview preview or print the report .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[endreport close the report .htm|{{btn_next_n.gif|Next page}}]] | | || **CancelPrintReport, VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} The **CancelPrintReport **method is a virtual method that allows you to write any clean up code to execute when canceling in a Print Preview window. **Member of: [[reportmanager methods.htm|ReportManager]]** **Implementation:** The AskPreview method CancelPrintReport method. The method is empty, but generates an embed point to allow custom code to be implemented. **Example:** **ReportManager.AskPreview PROCEDURE** **  CODE** **  IF NOT SELF.Report &= NULL AND SELF.Response = RequestCompleted** **    IF SELF.EndReport()=Level:Benign** **      IF NOT SELF.Preview &= NULL** **        IF CHOOSE (NOT SELF.SkipPreview, SELF.Preview.Display(SELF.Zoom), TRUE)** **          SELF.PrintReport()** **        ELSE** **          SELF.****CancelPrintReport()** **        END** **        FREE(SELF.Preview.ImageQueue)** **      ELSE** **        SELF.PrintReport()** **        FREE(SELF.PreviewQueue)** **      END** **    ELSIF NOT SELF.Preview &= NULL** **      FREE(SELF.Preview.ImageQueue)** **    ELSE** **      FREE(SELF.PreviewQueue)** **    END** **  END**