asp.net-mvcreport-viewer2010

ReportViewer not displaying report properly in Firefox and Chrome


I am trying to run this report page which is being displayed on a page and it appears to work/display fine in IE but when i run it in Firefox or Chrome I only get the header bar of the report and either i have to refresh the report or page and then it will work - also tried clicking on the next and previous page arrows on the report header to display the report on the page properly. I am not sure what is the cause or if could be fixed but it something frustrating at times.

This is what i have for the page running/displaying the report:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActivityReport.aspx.cs" Inherits="Kids.MVC.Reporting.ActivityReport" %>
<form id="form" runat="server">
    <asp:ScriptManager ID="scriptManager" runat="server" EnablePartialRendering="false" />
    <uc1:ReportViewer ID="reportViewer" runat="server" />
</form>

This is my ReportViewer display page I have:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ReportViewer.ascx.cs"
Inherits="Kids.MVC.Reporting.ReportViewer" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<style type="text/css">
    .ReportViewer table
    {
        border-collapse: collapse;
        border-spacing: 0;
    }
    .ReportViewer *  
    {
        background-image:none;       
    }
</style>
<div class="ReportViewer">
    <rsweb:ReportViewer ID="reportViewer" runat="server" Width="100%" Height="100%" AsyncRendering="False"
        ExportContentDisposition="AlwaysAttachment" SizeToReportContent="true" BackColor="White" ShowRefreshButton="False">
    </rsweb:ReportViewer>
</div>

Solution

  • Oddly enough i found the reason for the glitch. Since this was only happening to some reports i compared reports and noticed the reports which i had a line break caused the glitch and for the report not to show in FF or chrome (only showing the header of the report). So taking out the line break fixed my problem. I also replaced the line break with a bunch of under scores in a text box.