fgl_report_getErrorStatus

Returns the most recent error status.

Syntax

fgl_report_getErrorStatus() 
  RETURNS ok INTEGER
  1. ok - TRUE if an error occurred or if the user aborted the report, FALSE otherwise.

Usage

This function returns the most recent error status. The function should be called after calling OUTPUT TO REPORT and FINISH REPORT. Calling the function at any other point in time may return random results. The function returns TRUE in case of errors in GRE. It also returns TRUE if the user aborts the report.

Example

This sample code checks whether an error occurs while data is being fetched:

  FOREACH c_order INTO orderline.*                   -- use cursor to fetch data
     OUTPUT TO REPORT report_all_orders(orderline.*)  -- send data to report 
                                                        -- function
        IF fgl_report_getErrorStatus() THEN            -- stop the report if an error occurs or the user aborts the report
            DISPLAY "FGL: STOPPING REPORT, msg=\"",fgl_report_getErrorString(),"\""
            EXIT FOREACH
        END IF 
   END FOREACH