EndReport (close the report)

Top  Previous  Next

 

EndReport, VIRTUAL

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

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