7

I'm exporting an SSRS Report to Excel and when the user tried to sort it for some column. They got the message "This operation requires the merged cells to be identically sized.

How can I generate the report in SSRS with unmerged cells? I tried to get some property in the tablix, but I couldn't find

Thanks in advance

MemeDeveloper
  • 6,457
  • 2
  • 42
  • 58
Eliana
  • 171
  • 2
  • 3
  • 13

5 Answers5

7

This is usually caused by having a header with different column widths than your data area - the renderer puts merged cells in your table to get the header text Excel columns to align with the Excel columns of the table cells. You can try to fix this by making sure your header items exactly align with your table cells.

However, the best way to deal with this is to eliminate the header when exporting to Excel so you just get the table cells. With no header, there are no alignment problems.

There are a few options here. For a permanent export option, you can check my previous answers about adding a new Excel report rendering option or for a couple of ways to do it in a more manual way you can output to Excel using Simple Page Headers.

Chris Latta
  • 20,316
  • 4
  • 62
  • 70
  • I had read and tested you solution but SimplePageHeaders doesn't work in SSRS 2008 R2. even if I restarted the service. That was someone wrote in one of your anwser.. – Eliana Jun 20 '12 at 05:21
6
  • One way is to not output the troublesome parts of the report. You can go to the property pages of the element -> Visibility -> Show/Hide based on expression, then use this expression:

=(Globals!RenderFormat.Name = "EXCEL") and it won't show the part in the excel export.

  • Another tip is to make sure everything lines up perfectly, and use point measurements not cm's for sizes.

References:

Community
  • 1
  • 1
David d C e Freitas
  • 7,481
  • 4
  • 58
  • 67
3

This is usually caused by header/columns/textboxes/footer with unaligned alignment. Even 1 point or 0.5 inches off would cause this merged cells when being exported to Excel. Make sure that everything is aligned correctly. Encountered this issue multiple times in multiple projects and it's always the same root cause.

King Ian
  • 31
  • 3
  • I've just fixed this issue and as you say, you must be sure that everything (logos, titles, tables, footer,...) are well aligned so most left items start at same position (0.0 in my case) and end also in the same position. To identify where the problem is, export to excel and look for empty columns in the sequence – Héctor Espí Hernández Mar 09 '17 at 09:23
  • This is exactly what caused the issue for me. I had a header across the top of the report which spanned many columns, but whose end was right in the middle of one report column. I just adjusted that cell to snap inline with the end of the column it was bisecting and that fixed the issue. – ctb Feb 25 '19 at 21:11
1

Please ensure that your header text box and tablix are having same width. This will eliminate the chances of merging cells. If both are not having same width, then it will merge cells of excel, where your header edges are.

  1. Ensure all of your unbound Textboxes are sized to match you tablix width.
  2. Ensure all unbound textboxes fit within a tablix column.

Reference - How to Eliminate Excel Column Merging in Exported SSRS Reports

MemeDeveloper
  • 6,457
  • 2
  • 42
  • 58
Maria
  • 41
  • 1
  • 6
0

you can also modify rsreportserver.config found if C:\Program Files\Microsoft SQL Server(SSRS Installation Folder)\Reporting Services\ReportServer and replace:

 <Extension Name="EXCELOPENXML" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering"> <Extension Name="EXCELOPENXML_NoHeader" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering"/>

with

 <Extension Name="EXCELOPENXML_NoHeader" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering"> <Extension Name="EXCELOPENXML_NoHeader" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering">                <OverrideNames>                        <Name Language="en-US">Excel With No Header                        </Name>                </OverrideNames>                <Configuration>                    <DeviceInfo>                        <SimplePageHeaders>True</SimplePageHeaders>                    </DeviceInfo>                </Configuration>            </Extension>            <Extension Name="EXCELOPENXML" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering">                <OverrideNames>                    <Name Language="en-US">Excel With Header                    </Name>                </OverrideNames>            </Extension>

it will give you the option to export reports to excel with or without the header. This is a one time change and no need to modify all reports. No need to restart SSRS service. Tested with SSRS 2014, 2016, 2017