Exporting from SSRS 2008 ReportViewer to Excel Causes Duplicate Columns

Posted by Daniel Coffman on Stack Overflow See other posts from Stack Overflow or by Daniel Coffman
Published on 2010-05-21T17:31:19Z Indexed on 2010/05/21 17:40 UTC
Read the original article Hit count: 627

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about ssrs

Related posts about reportviewer