Exporting from SSRS 2008 ReportViewer to Excel Causes Duplicate Columns
- by Daniel Coffman
I have a report that groups months by quarters, so each quarter has three months and the display of the months under the quarter is toggled by the quarter header.
It looks just fine in the ReportViewer, but when exporting to Excel the first month in the quarter with data is duplicated and appended to the end of the quarter group.
Here is what it looks like in the ReportViewer (with Quarters 2 and 4 expanded, note May and June do not have any data and show blank columns by design):
http://i.imgur.com/MykZE.png
This is how it looks when exported to Excel:
http://i.imgur.com/zfLuk.png
The collapsed Quarter should only show the LAST month in the quarter.
You can see that in the Excel export July is inserted in Q1 even though it should be hidden entirely since that quarter is collapsed, December is appended to Q2, January is inserted into Q3, and April is duplicated and appended to Q4.
Exporting the any format OTHER than Excel works correctly and does not insert these columns.
A similar bug for rows was filed and marked as "by design": http://connect.microsoft.com/SQLServer/feedback/details/508823/reporting-services-2008-group-by-export-to-excel-duplicate-rows-csv-ok-pdf-ok
How do I stop the export to Excel feature from inserting these duplicate columns?