Overview

SSRS (SQL Server Reporting Services) is a server-based report generating software system from Microsoft. It is part of the suite of Microsoft SQL (Structured Query Language) Server services, and allows for creation of SQL reports, which are used heavily in development environments.

In this article, we will be showing how to create an SSRS report that exports a fixed text file format for uploading to a, for instance, payroll vendor.

Considerations

  • SSRS has .xls, .xlsx, .csv, .xml, .tiff, and .html export options, but no .txt. The .txt option may be needed in the case of, for instance, files that have to be uploaded as fixed text; that is to say that the file has a specific format in which the data is organized in order to be accepted by the receiver of it.
     
  • There are alternatives to this solution, but in cases where custom rendering is the best path forward to achieve the proper format and layout, this document should help.

     
  • Many customers are moving off of SSRS and onto things like Power BI. If no other workarounds exist and you need an easy way to get formatted Text output from a SQL Query on a repeatable basis, this is a nice little trick that we've found.


Solution

On the SSRS server, edit the rsreportserver.config file to add a “Custom Rendering” option:

 

This overrides the default rendering for reports on the reporting server to create a new export option called “Text File” and suppresses the header.