Monday, August 17, 2009

"object required" zofnhot=ofnh.offsetTop*zm MS SQL Server 2005 bug

Today I had to fix an issue: “Object required” JavaScript error when trying to view a Microsoft.Reporting.WebForms.ReportViewer generated report.

Due to the lack of information on this error in the Google’s search results (e.g. http://allaboutmicrosoft.net/forums/t/54360.aspx did not help and did not have a correct workaround) I decided to post an error-fix here.

Basically, the error-producing report template (rdlc file) had few tables. But those tables were used not to display similar data row-by-row but to display static amount of rows with different data in each row, see details on the screenshot:



The fix was as simple as changing the properties of the table. To fix the issue I opened “General” tab in the table’s properties window and unchecked checkboxes in the “Header/footer:” section of the tab:



That’s it, hope this helps somebody.