SSRS won't expand the row height when exported to Excel
Asked Answered
D

7

16

I have a report I am doing with SSRS 2008 with some rows that have multiple elements inside them. On the preview the row automatically expands to support the extra elements but however when I export the report to Excel it appears only as a single row with just the one element displayed, although all the elements are there when I double click the row or manually expand it.

I've checked everything...Can grow is set to true and the properties on the text box allows it's height to increase however it seems to ignore these.

Here it is in the preview http://tinypic.com/r/b4wbdg/8

In Excel http://tinypic.com/r/r084g3/8

Sorry about the links to the pictures and not in this question

Duley answered 22/8, 2014 at 9:30 Comment(0)
G
33

Both CanGrow and CanShrink properties should be set to false. There is nothing like CanGrow and CanShrink in Excel. By setting them to false it will display the height as it is. Otherwise it will set the height to a default value.

This worked for me. Check this Row height not preserved when exporting to Excel thread for more suggestions.

Ghana answered 24/7, 2015 at 17:20 Comment(2)
It does. Unfortunately you have to manually change the row height to accommodate exported line wraps but the CanGrow property still has to be set to false for the excel export to work properly. This is a bug. Wonder if fixed in future versions as still on Reports Builder 3.0Subeditor
Hi @GaryThomann, I'm facing same problem and tried as mentioned on above comment and still the excel export shows the header column as single line. I've used matrix table with in another matrix table group in my design and inner matrix table column is defaulted to single line regardless of manual change on row height.Contagious
A
11

Came across this (again) recently and thought I'd share my take...

Whether Excel correctly renders the height has to do with merged columns. Take note of your column alignments throughout all objects on the page. Any objects not tied to the data table itself (or embedded inside the data table) must be aligned with the columns of the table in question, at least for the cells that need to wrap text. If there is any overlap causing the table columns to be split and the cells of wrapped text to be re-merged, Excel will not recognize the row height by either setting the CanGrow to True or snapping the row to fit within Excel.

In the original post, the user mentioned rows with multiple elements inside of them. It is possible that those elements caused the column to split for the surrounding subtotals or adjacent groups with wrapped text.

Setting the CanGrow to False will simply prevent any automatic sizing of the row height by default for both the web view and Excel export, so I don't know if that's the ideal solution to this problem.

Aleksandropol answered 26/8, 2019 at 20:46 Comment(3)
I feel like this answer provides a more robust explanation. Changing Can Grow/Shrink was not helping me but when I looked at the merging of cells and unmerged any cells I wanted to grow/shrink then it worked perfectly on both the web view and the Excel export.Raddy
That was my problem. There was a logo at the top of the report and the first column was larger than the image. Once I made the column smaller than the image width, it fixed it and the line of the column would expand if content was too long for the width of the columnLucid
In my case a few "page width" columns were not as wide as some others. Once I made them all match, column heights were ok (i.e. double height if content spanned 2 lines). CanGrow is true and CanShrink is not specified for all columns.Bakemeier
V
7

Both CanGrow and CanShrink properties should be set to false This must be done for all cells in the row of the Tablix!! Otherwise the data is not properly exported.

Vanvanadate answered 4/10, 2016 at 10:46 Comment(0)
M
1

I remove the header of the report, and all works perfectly.

I have other reports and I see now that if I remove the textboxes that are included on the sheet when exporting to excel, then the row heights in excel are sized properly.

Motta answered 25/7, 2018 at 16:29 Comment(1)
I had the same issue but was able to fix it by making sure the boundaries of the textboxes lined up exactly with the columns or boundaries of the data table/matrixSkiver
D
0

reduce the widths of the rows and it fixed my problem

Duley answered 22/8, 2014 at 16:17 Comment(0)
R
0

I know this is an old question but I've been struggling with it. My issue was that I had a second field in a column where I inserted a placeholder underneath the field in the column. When exporting to Excel I wanted it to be tall enough that the second field would show underneath the main field in the column.

To get it to work for me, I inserted a blank column next to it and made it just wide enough for a single character. Then I click and hit enter several times to force it to be multiple lines. When I export, I have a blank column but otherwise it worked for me.

Reputed answered 10/3, 2022 at 16:41 Comment(0)
C
0

Setting the CanGrow and CanShrink settings to False solved the problem for me.

The problem I had was that some rows (merged or not) in tables would shrink (despite CanShrink = False).

I am using PBI Report Builder v. 15.7.

HTH

Chick answered 26/6 at 13:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.