Use the textReport.clearErrorMessages() function to clear any error messages from the message stack. For more information see pushErrorMessage().
textReport.clearErrorMessages()
The following example clears the error messages for the report:
myReport TextReport = new TextReport();
...
myReport.clearErrorMessages();