Getting one Extra row when exporting SSRS report to Excel - excel

I have a simple Reporting Services report, a simple table, created with BIDS 2005, with the report wizard.
I run the report on a RS2008 R2 server as is and it renders perfectly.
When I export to Excel, an extra row is appended just below the table. The row is hidden and has a heigth of 409.5.
Where that row comes from ?
How to get rid of it ?
*nb - no extra row if run on a RS2005 server

The only way I found to eliminate the hidden row is change the layout of the report. I increased the height of all rows of from 0,53333cm to 0,538cm.
Anything less than 0,538cm doesn’t solve the issue.
According to Microsoft, the goal when exporting to excel is to match the visual appearance of the report as close as possible. The excel output may have unexpected things like extra rows or columns or merged cells as part of the process to match the layout.

Changing the tablix location to 0cm, 0cm , will fix the problem.

I was running into this issue and tried all the posted solutions I could find, but none worked for me. To be more specific, after exporting the SSRS report to excel there was an extra row that contained duplicated data from the first row of the group. This extra row was contained in a group that could be toggled and when that group was collapsed that extra row was still showing instead of nothing.
This was the report layout looked like before I made the change.
What I had to do was add an extra row above and outside the nested grouping by right clicking the group box and selecting "Add row" -> "Outside Group - Above"
Here is the report after.
After adding the rows outside the group there was no duplicated data in an extra row.

Try to change the Size of report(not table) to 0.0pt, 0.0pt.It will automatically set it to minimum required.

Related

Issue with removing rows in excel table

I was working with new office web add-in for excel and manipulating the excel tables programmatically.
There are some strange situations where depending on table location it is not possible to delete the rows of the table.
For example as shown in an image below, when removing row in the first table the error is "This won't work because it would move cells in a table on your worksheet."
In cases below there is no any error, I am not sure what is wrong with first use case.
and this
It's because in the first case removing one of the rows would move part of the rows of the second table (the first two columns would move up one row). In your other cases removing the row from the first table would only move up empty cells, not affecting the other tables.

Pivot Table returns wrong value on one row

I have a very strange problem. I built a macro that refreshes several PivotTables. Everything is fine except for one PivotTable where one value "AGHF21A#BFF" in the source gets changed into "54r" in the Pivot Table. Other PivotTables also get data from this source and they all get the correct value. This only happens with this specific case from a list of 30 products, this is the only one that changes the value in the Pivot Table.
I tried everything Excel would allow me do. I changed the format to string/general. I tried to do a calculated field. The strange thing is that if in the source data I add let's say any character, remove any character or change any character then the pivot table does recognize the code and does not change it to the strange code "54r." I have never seen any Pivot table do this before.
The Macro downloads different reports into Excel and then it refreshes the PivotTables. Any help would be very appreciated.

Hidden rows in SSRS report while rendering in Excel format

I am encountering an very unusual behavior while rendering a SSRS report in EXCEL format. I have a simple SSRS report with one parameter (Country).It has only one tablix (table) with no report header and footer. This report will be generated by executing a SSIS package. The SSIS package will pass the country parameter (one parameter at a time) and invoke the data driven subscription associated with the report. Three reports will be generated in Excel format in the specific location provided for each parameter passed. Say, one report for parameter India, one for Pakistan and final one for Srilanka. After the report generation, Sometimes I find that the last row is hidden in any one or all of three reports generated. So, I converted the specification of table height & width, row height and column width from inches to pt as per the workaround suggested by Microsoft. But, it is behaving in unusual pattern after this modification too. Sometimes the report has no hidden last row and sometimes it has. Please note that every time, I have used the same sample data for this report generation.
Also, I have changed below properties of textboxes in tablix as per suggestion in one of the workaround post
Padding - 2pt,2pt,0pt,0pt
Vertical align - Middle
Can grow - false
an shrink - false
And tried increasing the row height from 15pt to 22pt. But above same unusual behavior persists. I have attached the screenshots of report design and sample report here Did anyone experienced this issue before. Any suggestions on this issue will be really helpful.
Report Design
Here row 10045 is hidden
After spending around an hour, I figured out the fix for it.
As mentioned by Microsoft the row height/width measurement has to be in points.
The main part is you have to apply it for all the cells of the tablix. Select ALL the cells and Press F4 to get the properties window and do the required changes in points (shown below).
Note: The default height of excel row is 14.4pt.
I have been facing the same issue, what I did to fix:
1. Converted all the size from cms to pts, page size, report size, columns size, row size, tablix size.
2. It didnt work even after changing row height to 14.2pt, because font was verdana 10pt, and for that minimum 14.3pt is needed in excel
3. I have changed row height to 14.3 pt, and now it works always. No more hidden rows.
Hope this helps.

SSRS how to set a merged column to be split in excel

I have an issue that I know is solve-able, I just cant find the setting or work out how to do it. I have a report where I have merged two columns. Lets say these are columns a and b. I want that when the report is exported to excel that you can click into column A, and it does not merge with column b. this would allow you to filter etc by the data under column a. The reason column a and b are merged in the first place is that the heading needs to go across two cells due to size.
I know this is do-able as it exists on a report i inherited, just i can't find the setting.
This is usually due to the misalignment of your header cells with your table cells. The Excel export tries to have everything formatted the same as in the report so it will sometimes use two columns for the table cells and merge them so it can align the columns to the header columns. This is problematic when it comes to manipulating, filtering and sorting the spreadsheet.
The best way to avoid this is to create an Excel renderer that doesn't render the header part of the report as described in my answer here.
However, if the cells need to be merged in your report deliberately then you aren't going to be able to do what you want to do using your current report as Excel will duplicate the formatting, including the merged cells.
Probably the only way to get something like what you are after is to create another report that is formatted the way you would like it to be in Excel. In the header of your original report put a text box (or an image with an Excel icon) with an Action on it to open the new, properly formatted, report in Excel, passing across parameters as appropriate. Now the user just need to click on the Action link in the original report to open the more user-friendly report in Excel.

Why is my Crosstab being cut off in Excel?

I'm attempting to create an excel spreadsheet using BIRT. The spreadsheet is a crosstab mapping two objects together. The number of rows and columns are dynamic based on values in a MySQL database. Currently I have a working implementation of the report for PDF output. Now, I am trying to create a second version of the report for Excel.
I have copied the report design and begun adjusting it to work with Excel. Everything looks good, but only the first 3 columns are displayed after the header. All rows appear correctly.
I have tried the following:
I tried setting Overflow to Visible on every element on the page. This had no effect.
I tried setting the master page's height and width to ridiculously large values. All of the information displayed correctly, but I am hoping for a solution without hard coded values. In the future the data width might exceed my arbitrary value again and be cut off.
I am constrained in the following ways:
I am not able to switch reporting engines (I have to use BIRT).
I am not able to switch Excel emitters.
This blog entry mentions my problem:
http://www.spudsoft.co.uk/2011/10/the-spudsoft-birt-excel-emitters/
but it does not offer a solution other than an emitter switch. The specific quote is "The files also have problems with page layout that I could not work around (specifically wide reports would be cut off)."
Beyond the one blog entry my googlefu has failed me. Any help is appreciated! Thank you!
There are two questions here. The first one is relatively easy, the second is complex.
1.Why is my Cross tab being cut off in Excel?
2.How do I dynamically adjust the master page width based on the number of columns in the report at runtime?
A1: The Cross tab is being cut off because column widths have been manually set, where the number of columns will expand past the set width of the Master page. Anytime you grab report design element and adjust, BIRT assumes you know what your doing and does not override your setting.
The solution is to recreate the report element (Table or Cross Tab) and not manually adjust any sizes. When run in HTML or Excel all the columns will be automatically set to display in the available master page width.
Screen shot of a BIRT 4.2 Cross Tab, Report Item with a 2 inch master page width and 30 columns
A2: This is not easy, and I will not be providing the answer at this time. I will point toward the solution and identify a couple of the road blocks. A valid solution to this question must include a functioning solution using the Sample Database.
(as of BIRT 4.2.1)
Challenge1 - The Master Page Width is set BIRT Report Scripting in events prior to report Table or Cross Tab item being completed. You can not simply count how many columns are in the report;
If you wanted to count, columns --
Report Design intialize
columnCount = 0;
Cross Tab, onCreate
columnCount ++;
In my research there are two paths suggested for counting columns prior to the Cross Tab item being created. Either
Run the data set in the beforeFactory (this means two queries to the data base, one to count and one for the report), then get a count and use it.
Calculate the value in your intial query and harvest it in the Data Set, onFetch.
I followed the Data Set, onFetch, option using a computed column but did not get it working.
Challenge2 - The Width Property of the Master Page must be set on or before the Report Design, beforeRender. With the beforeFactory being the most often recommended. Additionally the Width Property of the Master Page is only available when the Master Page "Type" is set to "Custom", in my attempts I set this manually in the Property Editor General.
Passing Values from the onFetch to beforeFactory must be done using a PersistentGlobalVariable which can only pass strings, not integers. I found all kinds of way for this to not work. Even passing "12in" in PersistentGlobalVariable failed to adjust the master page Width
Either of these codes in beforeFactory will adjust the Master Page Width (when Type = Custom)
Pass the Value
reportContext.getReportRunnable().designHandle.getDesignHandle().findMasterPage("Simple MasterPage").setProperty("width","12in");
Calculate a value and pass it
increaseWidth = 20;
reportContext.getReportRunnable().designHandle.getDesignHandle().findMasterPage( "Simple MasterPage").setProperty("width",((2+increaseWidth)+"in"));
In the end I have been unable to find or create a functional report that adjusts the Master Page Width passed on the number columns generated at report run time. I think it is possible, but doing so is beyond my current skills.

Resources