Changed error handling in report viewer. Fixed report viewer.