I exported a crystal report to PDF.It's working normally in all browsers except Google chrome.Can anyone suggests any code to make it compatible with all browsers?The code i used to export is shown below

System.IO.FileStream fs = null;
                long FileSize = 0;
                DiskFileDestinationOptions oDest = new DiskFileDestinationOptions();
                string ExportFileName = Server.MapPath("\\CrystalReport1.rpt") + "Export";
                oRpt.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                oRpt.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
                oDest.DiskFileName = ExportFileName;
                oRpt.ExportOptions.DestinationOptions = oDest;
                oRpt.Export();
                Response.Clear();
                Response.Buffer = true;
                Response.AddHeader("Content-Type", "application/pdf");
                //Response.AddHeader("Content-Disposition", "attachment;filename=OnlineGO.pdf;");

                fs = new System.IO.FileStream(ExportFileName, FileMode.Open);
                FileSize = fs.Length;
                byte[] bBuffer = new byte[Convert.ToInt32(FileSize) + 1];
                fs.Read(bBuffer, 0, Convert.ToInt32(FileSize));
                fs.Close();
                Response.BinaryWrite(bBuffer);
                Response.Flush();
                Response.Close();

kindly anyone please help me to solve this thread
Thanks In advance
*Ranj*

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.