You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2026/09/12 10:00:00 UTC
[jira] [Resolved] (WW-5731) JasperReport7CsvExporterProvider sets the record delimiter to the field delimiter
[ https://issues.apache.org/jira/browse/WW-5731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart resolved WW-5731.
-------------------------------
Resolution: Fixed
> JasperReport7CsvExporterProvider sets the record delimiter to the field delimiter
> ---------------------------------------------------------------------------------
>
> Key: WW-5731
> URL: https://issues.apache.org/jira/browse/WW-5731
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JasperReports
> Reporter: Lukasz Lenart
> Assignee: Lukasz Lenart
> Priority: Major
> Fix For: 7.4.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {{JasperReport7CsvExporterProvider.createExporter}} in {{struts2-jasperreports7-plugin}} configures the CSV exporter with
> {code:java}SimpleCsvExporterConfiguration config = new SimpleCsvExporterConfiguration();
> config.setFieldDelimiter(reportDelimiter);
> config.setRecordDelimiter(reportDelimiter);
> {code}
> so records are separated by the field delimiter ({{,}} by default, or whatever {{struts.jasperReport7.csv.defaultDelimiter}} / {{JasperReport7Aware.getCsvDelimiter}} returns) instead of a newline. The exported CSV comes out as a single line.
> The 6.x plugin ({{JasperReportsResult}}) only sets {{JRCsvExporterParameter.FIELD_DELIMITER}}, so this looks like a copy-paste slip from WW-5455. Dropping the {{setRecordDelimiter}} call restores JasperReports' default record delimiter ({{\n}}).
> {{JasperReport7ResultTest.testExportToCsv}} does not catch it because it only asserts that the output contains the report title; an assertion on the line count would.
> Affects every release since 7.1.0.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)