Click here to Skip to main content
15,795,398 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 :,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" "">

<html xmlns="" >
<head runat="server">
    <form id="form1" runat="server">
        <asp:Button CssClass="btn" ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />

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);
        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";

        //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)
Updated 18-May-10 22:59pm
Sandeep Mewara 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 14-May-10 2:22am    
If possible, post the code snap also.

1 solution

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.
Share this answer

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900