crystal report is displaying blank screen in Internet explorer

本秂侑毒 提交于 2020-03-06 02:46:07

问题


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.


回答1:


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.




回答2:


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>



来源:https://stackoverflow.com/questions/18529805/crystal-report-is-displaying-blank-screen-in-internet-explorer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!