cancel
Showing results for 
Search instead for 
Did you mean: 

Printing/Exporting Issue in IE 7 with CrystalReportViewer asp.net control

kevin_hicks
Explorer
0 Kudos

I just recently setup my site to use the CrystalReportViewer control offered in asp.net. I have worked through all of the setup and configuration issues, which was a good time. I am currently stuck trying to getting around IE 7 from blocking the file download when you try and print or export from the viewer control.

Crazy part is it works fine one my localhost when testing out of Visual Studio 05. I never get the download warning in IE 7. However, when I post it to the server I get the warning dropdown. I have dealt with this issue before when streaming files from the server to the client by using:

Response.AddHeader("content-disposition", "attachment;filename=Sales Report.xls")    
' Set MIME type to Excel.
Response.ContentType = "application/vnd.ms-excel"    
' Remove the charset from the Content-Type header.
Response.Charset = "" 
Response.Write(string or whatever goes here) 
Response.End()

I will say that all of my pages use AJAX, but I have removed all the ajax references from my test page. So this should not be an issue.

Test page code:

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" AutoEventWireup="false" %>
<%@ Register TagPrefix="CR" Namespace="CrystalDecisions.Web" Assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Report Window</title>
</head>
<body>
   <form id="form1" runat="server">
    <div>
        <CR:CrystalReportViewer ID="CrystalReportViewer1" Runat="server" AutoDataBind="True"
            Height="1158px" ReportSourceID="CrystalReportSource1" Width="1059px" GroupTreeImagesFolderUrl="" ToolbarImagesFolderUrl="" ToolPanelWidth="200px" Style="z-index: 64; left: 0px; position: absolute; top: 0px" />      
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report FileName="EstActionList.rpt">
            </Report>
        </CR:CrystalReportSource>
    </div>
    </form>
</body>
</html>

How can I prevent IE7 from giving my users a download warning? And I want to do this in code, not by changing the settings in IE7.

Thanks,

Kevin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kevin,

The question you have posted would be best answered on the Business Objects SDK Application Development Forums as it involves a custom application.

However, below are a few points which might be helpful for you.

While using the Application if you are using print mode as ActiveX then you need to enable the IE settings other wise you can try using the pdf mode for printing.

Moreover our viewer do not work very well with ajax so try removing the ajax control from the page.

If trying the above things does not help, then please do post this question on Business Objects SDK Application Development Forums.

Cheers!

Answers (0)