Crystal Report不能使用Internet Explorer 7导出 [英] Crystal Report does not export using Internet Explorer 7

查看:110
本文介绍了Crystal Report不能使用Internet Explorer 7导出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当我使用Visual Studio 2005进行Web开发时,水晶报表不会使用Internet Explorer 7导出(显示).
我使用Crystal报表与vs2005一起开发报表,我不使用Crystal报表服务器,我也按照说明进行操作
重置ie7中的设置(指令为:http://www.financialreporting.ioc.state.il.us/System_Requirements.asp),但是报告仍无法导出到ie7中,我不知道为什么.
有人可以帮我吗?
提前谢谢!
我的水晶报表代码是:

在aspx文件中:

Hi,
When i use Visual Studio 2005 for web development, then the crystal report does not export(show) using internet explorer 7.
i develop the report using the crystal report together with vs2005,i do not use the crystal reports server,also i have followed the instruction
to reset the seting in ie7(the instruction is :http://www.financialreporting.ioc.state.il.us/System_Requirements.asp),but the report still can not export in ie7,i do not know why.
can anybody help me?
Thanks in advance!
my crystal report code is:

in aspx file:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AnJuanFengPi.aspx.cs" Inherits="pages_print_AnJuanFengPi" %>

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button CssClass="btn" ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    </div>
    </form>
</body>
</html>



在aspx.cs文件中:



in aspx.cs file:

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Data.SqlClient;
using System.Globalization;
public partial class pages_print_AnJuanFengPi : System.Web.UI.Page
{
    ReportDocument reportDocument = new ReportDocument();
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Session["archivesNo"] = "B1.1-00011";
        string strCon = System.Web.Configuration.WebConfigurationManager.AppSettings["ConnectionString"];
        SqlConnection sqlcon = new SqlConnection(strCon);
        sqlcon.Open();
        SqlCommand sqlcom = new SqlCommand();
        sqlcom.Connection = sqlcon;
        sqlcom.CommandText = "SELECT     vw_archiveInfo.* FROM         vw_archiveInfo where archivesNo=''" + Session["archivesNo"] + "'' ";
        SqlDataAdapter sqlda = new SqlDataAdapter(sqlcom);
        DataSet ds = new DataSet();
        sqlda.Fill(ds, "vw_archiveInfo");
        ds.DataSetName = "AnJuanFengPi";
        sqlcon.Close();

        reportDocument.Load(MapPath("./AnJuanFengPi.rpt"));
        reportDocument.SetDataSource(ds);
        //reportDocument.SetParameterValue(0, Convert.ToDateTime(DateTime.ParseExact(Session["gdDate"].ToString(), "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture).ToString("yyyy/MM/dd")));
        reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "");
    }
    protected void Page_UnLoad(object sender, EventArgs e)
    {
        reportDocument.Close();
        reportDocument.Dispose();
    }
}

推荐答案

只需从源页面中删除doctype html ... 1行代码,然后尝试.

我不确定,但是我认为您的问题应该解决.
Just Remove doctype html... 1 line code from your source page and try.

I am not sure but i think your problem should be solved.


这篇关于Crystal Report不能使用Internet Explorer 7导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆