Link to home
Start Free TrialLog in
Avatar of Andrew Cowan
Andrew Cowan

asked on

SSRS Report Builder - Export to CSV issue; Double Quotes exist for each record

SSRS Report Builder - Export to CSV issue; Double Quotes exist for each record.

We have a report that is scheduled to produce a CSV file.
This file is consumed by another application and requires specific formatting in order to successfully process the file.
The following entry has been configured within the 'rsreportserver.config' file:

<Extension Name="CSV (No Header)" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
                        <OverrideNames>
                              <Name Language="en-AU"> CSV No Header</Name>
                        </OverrideNames>
                        <Configuration>
                              <DeviceInfo>
                                    <NoHeader>true</NoHeader>
                                    <Extension>CSV</Extension>
                                    <Encoding>UTF-8</Encoding>
                                    <Qualifier></Qualifier>
                              </DeviceInfo>
                        </Configuration>
                  </Extension>

The file that is being generated from this contains double quotes at the start and end of each record (see below).
"""FORMAT BATCH IMPORT, STANDARD 1.0"""
"DREF1,DDATE1,DSOURCE,DCLRENTITY,DENTITYPE,LLDGCODE,LACCNBR,LAMOUNT1,LNARR1,LNARR2,LNARR3,LPRESCSTAT,LGSTTYPE,LGSTRATECODE,BIMPNAME,BCLRENTITY"
"180603,06/06/2018,AB,123,A,AB,123456789,-1234.56,Team Journal,21/05/2018 to 03/06/2018,12345,N,I,NA,TEAMJNL,123"

The output we need is shown below:
"""FORMAT BATCH IMPORT, STANDARD 1.0"""
DREF1,DDATE1,DSOURCE,DCLRENTITY,DENTITYPE,LLDGCODE,LACCNBR,LAMOUNT1,LNARR1,LNARR2,LNARR3,LPRESCSTAT,LGSTTYPE,LGSTRATECODE,BIMPNAME,BCLRENTITY
180603,06/06/2018,AB,123,A,AB,123456789,-1234.56,Team Journal,21/05/2018 to 03/06/2018,12345,N,I,NA,TEAMJNL,123

Please advise how to fix this.
Avatar of Mike McCracken
Mike McCracken

Try adding this line above the noheader line

<FieldDelimiter>;</FieldDelimiter>
Avatar of Andrew Cowan

ASKER

We ended up finding an external solution to strip the quotes out of the csv file.
Although this is not be a permanent fix, we will take the suggestion to add FieldDelimiter>;</FieldDelimiter> above the noheader line when we begin testing again.

Thanks.
Try including these lines

<FieldDelimiter>|</FieldDelimiter>
<ExcelMode>False</ExcelMode>
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.