One of my customers created a report used to send data to another system via a file transfer. The problem is the transfer is not direct and requires a process to convert the CSV to pipe delimited. The system receiving the data has a format it expects that isn’t configurable and must be pipe delimited. Reporting Services comes with the ability to export a comma delimited out of the box, but that’s the only text file option by default.
After a little chat with Mr. Google I found that adding a new data rendering extension in SSRS is quite simple and any text file output you may want is just a change to the reportserver.config file away.
Add the following snippet to your <Render> node:
<Extension Name="PIPE" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"> <OverrideNames> <Name Language="en-US">TXT (Pipe delimited)</Name> </OverrideNames> <Configuration> <DeviceInfo> <FieldDelimiter>|</FieldDelimiter> <FileExtension>txt</FileExtension> </DeviceInfo> </Configuration> </Extension>
Another thing, once the rendering extension is added it can be accessed from all interfaces.
- This rendering format can be called from the ReportManager application as you see in the screenshot.
- It can be used in file share delivery for your subscriptions
- It can be used as a rendering option in custom URLs you create to run reports from other applications using the following command in the URL: &rs:Format=PIPE&rs:Command=Render
The Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport has numerous configuration options, pipe delimited is just one, so customize away!