SSRS Export to Excel creates additional columns

て烟熏妆下的殇ゞ 提交于 2019-12-07 15:26:00

问题


I have a SSRS report that when I export to Excel, creates unwanted columns when viewed in Excel. What would the best way to go about ensuring no additional columns are created. I have tried setting the location of the table rows to 0in, 0in but that did not resolve the problem. The attached screen shot is what the report looks like in both Visual Studio and Excel.


回答1:


There are two ways to approach this:

  1. Align everything:

You need to align your textboxes with the main tablix to remove the unwanted columns.

So the first expression after the main tablix start, Align left with the Patient Name and right with the right of state text box.

Second Expression align the left with the left of Phone text box and align the right of expr with the right of state.

Same thing you need to do with all the text boxes. If they don't align you will get the extra columns.

Align Left by moving the left column of textbox to match with the table. You will see blue line which indicates if the report items are aligned.

Aligning right using mouse

Also if you select multiplie object you align them using Format >> Align Menu option.

  1. Create Tables to handle the alignment

Create tables without any groupings or detail. Delete the groupings as shown below.

Then add your report items in that table. One table before the main tablix and one after it. Make sure it doesn't give you any data otherwise you might get duplicate info.

It is lot easier to align table then to align 20 text boxes.

I have used both methods. If there are few items I will use 1. If there are lot more then I use approach 2.



来源:https://stackoverflow.com/questions/34643685/ssrs-export-to-excel-creates-additional-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!