SSRS Export to Excel creates additional columns - visual-studio-2012

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.

There are two ways to approach this:
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.
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.

Related

make direction of excel sheets of my birt report right to left

I have a birt report with excel output. I want to make the sheet direction right to left.
I try to do this via adding new style, but the style just make the text in cells right to left, not the direction of excel sheets itself.
This is an unresolved issue in BIRT. The report orientation does not work for XLS/XLSX. It might be either because of the way BIRT transmits BIRT-elements into excel cells or simply because no XLS-transmitter supports the feature. However, it does at least work for PDF - if that helps.
Eventually, you might just want to recreate that report with the desired orientation. To "align" elements like a headline most-right, you usually create a grid with a number of colums that equals or exceeds the number of columns of the data table. Then you put the headline element in the right-most cell of that grid.
Hope you find a way!

Extra column inserted before other columns when exporting to excel

I know how tricky it is to align things in a way that allows a clean export to excel, however, on this one I am stumped and have never seen it before.
Anyone know why the excel rendering extension insists on inserting a column like in the attached image?
Things that I have tried.
Set the table's position to 0,0.
Removed all borders and padding.
Set the report margins to 0,0,0,0
NOTE : I am using the EXCELOPENXML rendering format as opposed to EXCEL in order to support *.xlxs.
Groupings:
First Column in the Designer:
The report was being rendered as a sub report and was placed in a rectangle and aligned right in the main report, however, the rectangle was one twip off from left align. Once I aligned the rectangle in the main report, the phantom column disappeared.

How to use vertical headings in Excel tables

I am currently using Excel 2013. I wanted to use vertical headings in tables instead of horizontal ones. Horizontal headers take a lot of space but vertical ones don't.
I looked upon a number of web sites but not even one gave an intelligent answer. There were answers like inserting a section break or an image, etc.
I am a 9th grade student.
You can change the text direction by editting the "Format" of a cell or range of cells:
A table:
Right click on the header cells after selecting them and go to "Format Cells":
Go to the Alignment tab and change the alignment to 90 degrees:
Click OK and your text will be vertically aligned. You can align the cell text to the left using the button at the top to make it a bit prettier if you want:
Good luck on the class!

SSRS export to excel on separate worksheets issue

I'm using SSRS 2008 to export data to an excel file. I need 4 worksheets in the file. As a result, I'm inserting a page break after each Tablix. But when there's no data in the page,it's merging the sheet with the next one. I looked up for help, I found one where it says I need to insert a rectangle to avoid this. I'm not sure how I do this. Any help?
To add a rectangle On the Insert tab, in the Report Items group, click
Rectangle. On the design surface, click the location where you want
the upper left corner of the rectangle, and drag to where you want the
lower-right corner. Note that as you move the cursor, "snap lines"
appear as the cursor lines up with other objects on the design
surface. These help you if you want objects to be aligned.
Then I believe you set the page break to occur after the rectangle instead of after the tablix

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

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
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.
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.
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.
reduce the widths of the rows and it fixed my problem
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.
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.

Resources