Click here to Skip to main content
11,702,396 members (74,001 online)
Rate this: bad
Please Sign up or sign in to vote.
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)
Posted 13-May-10 15:21pm
Edited 18-May-10 21:59pm
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
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.

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

  Print Answers RSS
0 Maciej Los 455
1 Sergey Alexandrovich Kryukov 310
2 OriginalGriff 265
3 CHill60 145
4 Andy Lanng 99
0 OriginalGriff 8,369
1 Sergey Alexandrovich Kryukov 7,547
2 CPallini 4,922
3 Maciej Los 4,411
4 Mika Wendelius 3,556

Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 9 Jun 2010
Copyright © CodeProject, 1999-2015
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