Properly close the report in the close report handler.