Posted 26 July 2021, 5:57 pm ESTI used ActiveReport 6.2.3681.0 in a ASP.Net/C# Web application. For PDF export I used following code :
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);
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 ?