Wednesday, 1 May 2013

SSRS 2008 R2 Reports are blank in Chrome

I stumbled across this apparently well documented problem today, where my SSRS 2008R2 Report was showing up fine in IE, but blank in Chrome;

http://stackoverflow.com/questions/5968082/ssrs-2008-r2-reports-are-blank-in-safari-and-chrome

It seems as though the main Div Tag uses IE compatible only Overflow styles, which Chrome doesn’t interpret well.

I found a nice blog post here which explained how to work around this issue;

http://grumpydba.blogspot.co.uk/2012/02/sql-2008-r2-report-doesnt-show-on.html

The Short and curlies of it are;

Connect to your Reporting Services server, and find the relevant ReportingServices.js file - this will probably be somewhere like "C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js", or on a 64 bit machine, "C:\Program Files (x86)\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js"


First up, take a copy of this file - let's not be silly here and assume this is a 100% foolproof solution!
Next, edit this file in notepad. Do a quick search for PageLoad, to ensure no-one else has already hacked applied this fix, then jump to the bottom of the existing text.
Simply append the following code:

function pageLoad() 
{
    var element = document.getElementById("ctl31_ctl10");
    if (element)
    {
        element.style.overflow = "visible";
    } 
}


Save the file, and restart Reporting Services - you should now find that Chrome displays your reports again.


You’ll need to find the correct ElementId, by viewing the Source of the report in Chrome. If you search for “VisibleReportContent”, you should find something like “VisibleReportContentctl31_ctl09”. Where the “ctl31_ctl09” is the ElementID you’re looking for!

1 comment:

  1. Unfortunately, this fix no longer works for the elements mentioned in the above article after updating SSRS 2008 R2 with the latest Service Pack.

    ReplyDelete