Lately I’ve been looking into Microsoft Reportviewer 2010 for displaying customer reports on an EPiServer site. It’s a quite straight forward task and it should normally not create any problems.
Message: Object required
Debugging this error I found that it was thrown from the bold line in ReportViewers builtin ViewerScript, where regionElement turned out to be null:
SetSingleRegionVisibility: function(regionElementId, makeVisible)
var regionElement = $get(regionElementId);
regionElement.style.display = "";
regionElement.style.display = "none";
Right, now what? I checked everything. I checked that the Reportviewer HTTP handler I had added to my web.config was correct and that all the correct assemblies had been included. I whined about it on Twitter and to a colleague, but whining did surprisingly not fix the error.
I’d taken a look in the GAC several times to check that the assemblies were there as well, but then it suddenly hit me. On the test server, I had installed the Microsoft Reportviewer 2010 redistributables, while on my local machine I found the Microsoft Reportviewer 2010 SP1 redistributables. I updated the assemblies on the test server to SP1 and the problems were solved, hooray!
So much annoyance for so little!