3
votes

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.

enter image description here

1

1 Answers

1
votes

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.

enter image description here

Aligning right using mouse

enter image description here

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

enter image description here

  1. Create Tables to handle the alignment

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

enter image description here

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.

enter image description here

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