Export a report in pipe-delimited format in Reporting Services

This is an extra special two-fer blog post – you get to see how to change a comma-delimited CSV file into a pipe-delimited file, and how to remove an extra space that was being included at the end of a pipe-delimited export. To accomplish these exciting things, I had to dive into the rsreportserver.config, a place I don’t like going, but somebody had to do the dirty work. In the DeviceInfo element, I added the “ExcelMode” element with a value of False:

      <Extension Name=”PIPE” Type=”Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering”>
              <OverrideNames>
                  <Name Language=”en-US”>CSV (PIPE Delimited)</Name>
              </OverrideNames>
              <Configuration>
                  <DeviceInfo>
                       <ExcelMode>False</ExcelMode>
                      <FileExtension>csv</FileExtension>
                      <FieldDelimiter>|</FieldDelimiter>
                      <SuppressLineBreaks>true</SuppressLineBreaks>
                      <NoHeader>true</NoHeader>
                      <Encoding>ASCII</Encoding>
                  </DeviceInfo>
              </Configuration>
      </Extension>

You can also see how to create a pipe-delimited export, by creating a new “Extension” element. The “OverrideNames\Name” element contains the label that will appear when you click the Export button in Report Manager to see the list of options to export your file, such as Excel, PDF, and CSV. I changed the “FieldDelimiter” element to the pipe character, and the other fields are standard with the existing CSV export. With this knowledge, you’ll be the life of the party.

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: