WiseOwl Training - Established 1992 Wise Owl Training

Established May 1992
30 years in business
Wise Owl Training
30 years in business
See 516 reviews for our classroom and online training
Exporting SSRS Reports to Excel using RenderFormat
Part one of a four-part series of blogs

SQL Server Reporting Services 2008 R2 includes (among many other features) the ability to detect a report's rendering format, together with a facility for naming report pages. You can combine these two features to create Excel workbooks with individually named worksheets for each member of a group, as shown in this blog.

  1. Exporting SSRS Reports to Excel using RenderFormat (this blog)
  2. Hiding Reports Depending on ReportFormat
  3. Naming Excel Worksheets using PageName
  4. Testing the Final Report including SSRS gauges

Posted by Andy Brown on 25 July 2011

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Exporting SSRS Reports to Excel using RenderFormat

SQL Server Reporting Services 2008 R2 introduces (amoung many other things) the following two new concepts:

  1. The ability to assign a PageName property to any part of a report; and
  2. The ability to detect and react to the RenderFormat property of a report, to do different things according to how the report is being viewed.

This blog explains how you can combine these two ideas to create a report which looks like this (for example) in normal view:

Report in normal view

In normal view, the report just lists out films grouped by director.


However, when you view this report in Excel view, SSRS creates the following Excel workbook:

Cover sheet of Excel workbook

The first worksheet explains what the rest of the workbook contains.

Typical worksheet for each director

Subsequent worksheets list the films made by each director


How do you reach this programming nirvana?  The rest of this blog gives a free tutorial to explain how!

If you want to reproduce the report shown in this blog exactly, you may find it useful to download the script to generate the necessary database and table.


This blog has 0 threads Add post