Returns the most recent error status.
fgl_report_getErrorStatus() RETURNING ok INTEGER
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.
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