You are not logged in.
Pages: 1
Hello,
When I export a report using CSV the output records are only separated by a linefeed and not by a carriage return. Is it possible to change this setting? I've already tried a script which changes the System property line.separator, i.e. System.setProperty('line.separator','\r\n')
Last edited by Dennie (2016-11-18 12:52:17)
Offline
Hi Dennie,
unfortunately, this is not possible, since the line separator is currently '\n' and there is no way to change this.
For next reportserver versions we will consider changing this to '\n\r'.
Best regards,
Eduardo
Online
Hello Eduardo,
Thanks, please consider to use System.getProperty('line.separator') instead. It would be useful to have an option to set the file encoding as well.
Greetings,
Dennie
Offline
Yes, we will consider changing this hard-coded setting, thank you.
Regarding the file encoding, the CSV export uses the default reportserver config (main/main.cf): The setting is default.charset
Online
Hello Dennie,
we changed this hard-coded setting. In the next reportserver version, you will have a new configuration file /etc/exportfilemd/csvexport.cf :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<csv>
<printHeader>true</printHeader>
<separator>;</separator>
<quote>"</quote>
<lineSeparator>\r\n</lineSeparator>
</csv>
</configuration>
In this configuration file, you can set the line separator (among with other CSV settings). All these settings are also configurable in the CSV-Export dialog, so there is a default (the settings in the file) and a per-export setting (the settings in the dialog). The dialog shows by default the settings in the file.
Best regards and a happy new year,
Eduardo
Online
Pages: 1