Bob
Bob

Reputation: 339

How to switch comma to semicolon in CSV jasper-reports 6.5

I export CSV file through jasper-reports. It works fine however I want switch comma to semicolon. I found some solution but it is deprecated. I was looking for a method in SimpleCsvReportConfiguration without happy ending. Can someone help?

JRCsvExporter exporter = new JRCsvExporter();
exporter.setExporterInput(SimpleExporterInput.getInstance(jasperPrints));
exporter.setExporterOutput(new SimpleWriterExporterOutput(response.getOutputStream()));
SimpleCsvReportConfiguration configuration = new SimpleCsvReportConfiguration();
exporter.exportReport();

Upvotes: 1

Views: 1280

Answers (1)

Tom
Tom

Reputation: 313

You should add it to your .jrxml file:

<property name="net.sf.jasperreports.export.csv.field.delimiter" value=";"/>

Upvotes: 2

Related Questions