top of page
Writer's pictureMadeira Team

Customizing the File Format in SSRS

A short while ago, I was asked to create a certain report with a “Windows File Share” subscription.

The client wanted the file to be exported as a CSV without headers.

After some digging, I’ve found that there is no direct way to do it. Believe me, I’ve played around with almost every property in the report layout.

Eventually I’ve discovered that the best and fastest way to do it is by modifying the rsreportserver.config file.

I’ve played with it a little and discovered that it is pretty cool stuff.

There are many things we can do with this. Here is a step-by-step explanation of how to do it.

  1. Locate and open the rsreportserver.config file (usually located in C:Program FilesMicrosoft SQL ServerMSRS11.MSSQLSERVERReporting ServicesReportServer).

  2. Back up the existing config file (just in case you are doing this after a sleepless night like me).

  3. Now, locate the <Render> section within the original file. This is where the magic happens

  4. You can choose either to modify the existing extension parameters (which is not recommended), or to add new ones.I’ve added a new one. This is what it looks like:

Before:

XHTML

<Render> <Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering"/> <Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false"/> <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/> <Extension Name="ATOM" Type="Microsoft.ReportingServices.Rendering.DataRenderer.AtomDataReport,Microsoft.ReportingServices.DataRendering" Visible="false"/> <Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering"/> <Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RGDIRenderer,Microsoft.ReportingServices.ImageRendering" Visible="false"/>

1

2

3

4

5

6

7

<Render>

<Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering"/>

<Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false"/>

<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/>

<Extension Name="ATOM" Type="Microsoft.ReportingServices.Rendering.DataRenderer.AtomDataReport,Microsoft.ReportingServices.DataRendering" Visible="false"/>

<Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering"/>

<Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RGDIRenderer,Microsoft.ReportingServices.ImageRendering" Visible="false"/>

After:

XHTML

<Render> <Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering"/> <Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false"/> <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/> <Extension Name="CSV (No Header)" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering" > <OverrideNames> <Name Language="en-us"> CSV (No Header)</Name> </OverrideNames> <Configuration> <DeviceInfo> <NoHeader>true</NoHeader> </DeviceInfo> </Configuration> </Extension> <Extension Name="ATOM" Type="Microsoft.ReportingServices.Rendering.DataRenderer.AtomDataReport,Microsoft.ReportingServices.DataRendering" Visible="false"/>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

<Render>

<Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering"/>

<Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false"/>

<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/>

<Extension Name="CSV (No Header)" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering" >

<OverrideNames>

<Name Language="en-us"> CSV (No Header)</Name>

</OverrideNames>

<Configuration>

<DeviceInfo>

<NoHeader>true</NoHeader>

</DeviceInfo>

</Configuration>

</Extension>

<Extension Name="ATOM" Type="Microsoft.ReportingServices.Rendering.DataRenderer.AtomDataReport,Microsoft.ReportingServices.DataRendering" Visible="false"/>

That’s it! You’re all done. All you have to do is go to the Report Manager and see the change:

Before:

After:

Now you have an additional file format for your reports.

Once again, this is only one example out of many options you have here…

You can find more information about Customizing the rendering extension parameters here: http://msdn.microsoft.com/en-us/library/ms156281(v=sql.110).aspx

Good luck!

0 comments

Recent Posts

See All

Comments


STAY IN TOUCH

Get New posts delivered straight to your inbox

Thank you for subscribing!

bottom of page