views:

376

answers:

0

Thank you for taking the time to read my post.

All works fine in FireFox 3.5.

I'm having a problem with my ASP.NET 3.5 web application. When I use the ReportDocument.ExportToHTTPResponse IE6 shows the following:

    %PDF-1.7 
%âãÏÓ 
1 0 obj 
<< 
/Type /Catalog 
/Pages 2 0 R 
/PageMode /UseNone 
/ViewerPreferences << 
/FitWindow true 
/PageLayout /SinglePage 
/NonFullScreenPageMode /UseNone 
>> 
>> 
endobj 
5 0 obj 
<< 
/Length 386 
/Filter [ /FlateDecode ] 
>> 
stream
xœu‘MOÜ0†ïó+æ‡8ž|8ñÞB¨¡[²g³ñ..I¼
Ä¿¯íl¥=´²,Çãyç}LÈý"¿e¸ã‘ã|€%x¼ŸOü®DIY×8kx‚ ?JV•!K8BUK8@W[ Së,'–c’ÕL–¸!•Hœ ïá⩽ÅG=(gìôöbŽØªIôŒ­ÜËð…ÍΙã¾PM=>èOlúÞÄjt7æ¨3éKÜþ‚„dÆü"c¹ïÞÃÅ¿:¯b-qÉr?˜¯KÕÙD{åîí»WÜÛ|¿Kºû.ùÖ$œºëû›E­ ð$¡úÔäÜV«æWí©ë-ü*Šˆ#H‚f…§
©qmáç9²WÊ¥÷)\è-ó­µSfÀu³ùð¡z4è&Ê"¸OŠ²dòd®Ž7³™œîWH”r™fœKD.W¥Ä¦],eU„y„GK.¯D Sÿý­Ílû÷]Hûû£]×é£Ó㳿baü´û Rendstream 
endobj 
15 0 obj 
<< 
/Length 419 
/Filter [ /FlateDecode ] 
>> 
stream
xœuRÁjã0½û+tlÙ‚eG–0†6{Éa³¥i?À‘ÇÁËFvXò÷;OÓ-ì¡ÏHOO£÷2“ï?aXUþ'¢UõCè"-Ó-zRgºA¥ê¿~îRôc;«œ/ŸîËJã!ô“ªë,ãÃewõðœ~?Þ‡‘–#ýy›Æ6<½L×îQå¿cGqõð±?ñþt›ç+V¥UÓ¨Žú,ßÿjçc;’Ê¿-•ˆÅ§¢©£en=Å6\HÕöܨÚíE¡ûÿ,+\9÷²¯+ÇÜ´æ”Õ¦ãu
Zsb

In other words, it doesnt notice that it is a pdf and it just exports it to the screen. Using debugbar i have noticed that IE6 is seeing the content type as application/pdf. Any ideas? Here is the .NET code i was using.

ReportDocument doc = new ReportDocument();
                doc.Load(fileName);
                doc.SetDatabaseLogon(username, password);
                for(int i=0;i<values.Count;i++)
                {
                    doc.SetParameterValue(i, values[i]);
                }
                //ct.Response.ContentType = "application/pdf";
                fileName=fileName.Substring(fileName.LastIndexOf('\\')+1);
                fileName = fileName.Remove(fileName.LastIndexOf('.'));
                fileName += ".pdf";
                //ct.Response.AddHeader("content-disposition", "attachment; filename="+fileName);
                //ct.Response.RedirectLocation = ct.Request.Url.AbsoluteUri.Remove(
                //    ct.Request.Url.AbsoluteUri.LastIndexOf('/')) +"/"+ fileName;
                doc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, ct.Response,false,fileName);

As you can tell from my code i've tried a few things... but nothings working.

Any help is really appreciated. Thx!