Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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.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();
    }
}
Posted 13-May-10 16:21pm
Edited 18-May-10 22:59pm
v5
Comments
Sandeep Mewara at 14-May-10 1:33am
   
This is not a known issue. It works for everyone. Looks like some issue with you only. What extra or different you are doing?
Jitendra Zaa at 14-May-10 2:22am
   
If possible, post the code snap also.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,853
1 Sergey Alexandrovich Kryukov 7,107
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 9 Jun 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100