PdfExport error in EDGE/Chrome when file has comma

Posted by: debasis.dalal on 26 July 2021, 5:57 pm EST

    • Post Options:
    • Link

    Posted 26 July 2021, 5:57 pm EST

    I used ActiveReport 6.2.3681.0 in a ASP.Net/C# Web application. For PDF export I used following code :

    [b]DataDynamics.ActiveReports.Export.Pdf.PdfExport pdfExportObject = new DataDynamics.ActiveReports.Export.Pdf.PdfExport();

    pdfExportObject.ExportBookmarks = true;

    pdfExportObject.Options.Title = exportFileName;

    pdfExportObject.Export(DataDynamics.ActiveReports.ActiveReport.Document, exportPath + “\” + exportFileName);[/b]

    It is working fine in Internet Explorer but it is throwing error in EDGE/CHROME when the file name has COMMA.

    I found this is a known issue specific to Chrome/EDGE specifically related to the Content-Disposition header. This is caused by the fact that chrome/edge doesn’t properly handle escaping of commas while Firefox, IE, etc. do.

    In order to fix this we need to wrap the file name in response header with “Double Quotes”. E.g.-

    Response.AddHeader(“Content-Disposition”, “attachment; filename="” + saveNm + “.pdf"”);

    MY QUESTION IS, HOW SHOULD I DO THIS IN DataDynamics.ActiveReports.Export.Pdf.PdfExport ?

  • Posted 27 July 2021, 11:53 pm EST

    Please refer to the following forum post where I’ve replied to your question - https://www.grapecity.com/forums/activereports/pdfexport-error-in-edgechr#please-try-exporting-the-p

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels