Search this blog

Wednesday, August 12, 2009

SQL Server Reporting Services (SSRS) Report - Fix for Firefox

When SQL Server Reporting Services (SSRS) Report is viewed in Report viewer control in Firefox Browser, it won't display properly. But the same report displays properly in IE.

Have a look at the following sample report in Firefox and IE.

Reports in Firefox:

In Firefox, report is not displayed in full size, instead of that, it displays minimal size, but IE shows proper size

Reports in IE:



Reason is, Browser displays SSRS report data thru IFrame. In Firefox, the IFRAME's height defaults to a few hundred pixels, so that you can see the top 2 inches of the report. In IE, IFrames automatically fixed to Data height, so it works fine in IE.

To Fix the Issue in Firefox, hope any one the following 2 ways will help us.

Step1:

1. Go to the following Location, where SQL Server is installed
..\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\Pages

2. Open ReportViewer.aspx File

3. add the style property marked in bold and blue color, Then try this
style="display:table; margin: 0px; overflow: hidden" ID="ReportViewerControl" runat="server" />

If not Helps the first step, then try the step 2.

Step2:


ADD the following code to the ReportingServices.css file (by default, it's found in "C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager\Styles\"):

.DocMapAndReportFrame{ min-height: 860px;}

If you want Width also, then use this code


.DocMapAndReportFrame
{
min-height: 860px;
min-width: 1000px;
}

Put this code at bottom of the ReportingServices.css file. After you added this code, Close your browser and clear your cookies then try again

3 comments: