Quantcast
Channel: Thoughts, codes, occasional rants, many others. » SQL Server
Viewing all articles
Browse latest Browse all 11

Fixing SSRS 2008 R2 Row Limitation

$
0
0

As you must be aware, there is a limitation on SSRS 2008 R2 that only allows users to export 65,536 rows via Excel. The remaining can still be rendered, exported to Excel, CSV or other formats. This is because SSRS 2008 R2 still uses the Excel 2003 rendering engine. There are several ways to solve this issue, and the one I would choose is to buy a third party that I came across, including OfficeWriter. While trying to resolve this issue, I came across several posts that outlined adding a parent group, and making a group of 65000 records. I find that these posts, while solves the problem about rendering do not correctly address the issue when your report contains complex groups. I also found that making a group of 65000 records does not correctly work, you will have to find a lower number because there are rows spent on headers, footers, and any additional cells. This solution is not the most elegant however, as it exports data to different sheets – and the sheets lose their names.

The solution you will find all across does solve the issue, but there is a subtle problem. It only works with very simple reports where you can get rid of the groups, and only has details. The report that I was working on did not allow me to do that – there were quite a lot of business logic in this report that did aggregations based on user parameters. The problem that I encountered was that it did not group my records together as I wanted to, although every group did its sorting based on the certain field it was tied to. Another problem was – there was a grand total row which was part of the parent group (now, first child), and it repeated on every sheet, only aggregating data on each sheet.

The solution was to do the following:

  • Add a parent group and find a number (~50000) so that you can overcome the row limitation.
  • Move your aggregations out of the group so that this does not repeat per page. Now, aggregations will only be on the last page.
  • In order for SSRS to honor sorting, add sorting criteria in your tablix member properties.

I have not had a chance to do a deep level diagnosis to find if this increases the rendering time, but the solution seems to work for now.

Hope this helps you if you encounter the same situation. Please post in the comment section if you have any questions or I can help.


Viewing all articles
Browse latest Browse all 11

Trending Articles