| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ReportManager Class > ReportManager Methods >====== EndReport (close the report) ====== | [[cancelprintreport cancel report printing .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[getusemrp get usemrp value rm.htm|{{btn_next_n.gif|Next page}}]] | | || **EndReport, VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} The **EndReport **method prepares the report to close and returns a value indicating success or failure. This is a good place to add a final print summary or last page. Valid return value is | Level:Benign(0) | report closed successfully | **Member of: [[reportmanager methods.htm|ReportManager]]** **Implementation:** The EndReport method is called by the ReportManager's AskPreview method. It checks to see if any final break logic needs to be processed by the BreakManager, then issues an ENDPAGE statement. You can use the method's embed point to perform any post processing needed prior to closing the report and accessing the Preview window. **Return Data Type:     **BYTE **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**