#1 2016-11-18 12:51:08

Dennie
Member
Registered: 2014-08-22

CSV export

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

#2 2016-11-18 16:04:18

eduardo
Administrator
Registered: 2016-11-01
Website

Re: CSV export

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

Offline

#3 2016-11-18 16:09:23

Dennie
Member
Registered: 2014-08-22

Re: CSV export

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

#4 2016-11-18 16:28:16

eduardo
Administrator
Registered: 2016-11-01
Website

Re: CSV export

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

Offline

#5 2017-01-03 10:32:08

eduardo
Administrator
Registered: 2016-11-01
Website

Re: CSV export

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

Offline

Board footer

Powered by FluxBB