Fixed flow in the report preview and report details.
Fixed error handling in the server.