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>
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.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "");
}
protected void Page_UnLoad(object sender, EventArgs e)
{
reportDocument.Close();
reportDocument.Dispose();
}
}