Spider man
Spider man

Reputation: 3330

crystal report is displaying blank screen in Internet explorer

asp.net mvc crystal report is displaying blank screen in Internet explorer 10.But the same report is working properly in chrome and firefox. Can anyone give a suggestion? Thanks in advance.

Upvotes: 0

Views: 7988

Answers (2)

Spider man
Spider man

Reputation: 3330

Thank you nilesh. That solved the issue. In the crystal report viewer we have to add the following code:

<meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1" />  

The following is an example.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportViewer.aspx.cs" Inherits="Project1.Web.ReportViewer.ReportViewer" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="X-UA-Compatible" content="IE=9"/>


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
        AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="50px" 
        ReportSourceID="CrystalReportSource1" ToolbarImagesFolderUrl="" 
        ToolPanelWidth="200px" Width="350px" PrintMode="ActiveX" />
    <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
        <Report FileName="~/Reports/Report1.rpt">
        </Report>
    </CR:CrystalReportSource>

</div>
</form>

Upvotes: 1

oaksong
oaksong

Reputation: 47

This fixed it for me. What it neglects to mention is the crystalReportViewer folder has to be copied from Program Files(x86) to the proper subfolder under aspnet_client. You may already have a block in web.config. You only need one. The second bit of code goes below that section.

Copy the folders under "\inetpub\wwwroot\aspnet_client\" and paste them under the  root of the custom web site

 Add the following to the application web.config file:

<configSections>

    <sectionGroup name="businessObjects">
      <sectionGroup name="crystalReports">
        <section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"/>
      </sectionGroup>
    </sectionGroup>
  </configSections>

  <businessObjects>
    <crystalReports>
      <crystalReportViewer>
        <add key="UseBrowserLocale" value="true"/>
        <add key="resourceURI" value="~/aspnet_client/system_web/4_0_30319/crystalreportviewers13" />
      </crystalReportViewer>
    </crystalReports>
  </businessObjects>

Be sure that the name for the folder crystalreportviewers in web.config matches the name in aspnet_client.

Upvotes: 1

Related Questions