After export from report to excel format, each row combined with 2 rows, i means row override with 1 rows,
screenshot : http://prntscr.com/l3vj4p
output excel file : https://www.dropbox.com/s/cpnbhyv06yobbqh/InsatantReport.xls?dl=0
3 Answers, 1 is accepted
Usually this is due to mispositioned items in the report detail band or table. When exporting to Excel, the report processing engine tries to maintain the designed positions of the items. If the report contains a table, make sure its cell contents are aligned with the cell bounds. If the report is a band report, make sure the items are aligned with each other and that the top and height are equal for the items on a row.
You can check the Design Considerations for Excel Rendering for more recommendations about report layout when exporting to Excel.
If you are unable to determine the issue, please send us the report definition along with some sample data so we can investigate it on our side.
I use the below code to generate the report, After getting the report result we export to xls on that time for each row we get extra blank row in output xls.
Dim iniLeft As Decimal = 0.02
Dim iniWidth As Decimal = 1.05
For Each col As System.Data.DataColumn In datas.Columns
Dim headerTxt As New Telerik.Reporting.TextBox
headerTxt.Size = New SizeU(Unit.Inch(1.05), Unit.Inch(0.2))
headerTxt.Location = New Drawing.PointU(Unit.Inch(iniLeft), Unit.Inch(0.02))
headerTxt.Style.Font.Bold = True
headerTxt.Style.Font.Size = New Unit(10)
headerTxt.Style.VerticalAlign = VerticalAlign.Middle
headerTxt.Style.TextAlign = HorizontalAlign.Left
headerTxt.StyleName = "Caption"
headerTxt.Style.BackgroundColor = Color.FromArgb(121, 167, 227)
headerTxt.Value = col.ColumnName.ToString
headerTxt.CanGrow = True
headerTxt.TextWrap = False
headerTxt.Multiline = True
Dim detailsTxt As New Telerik.Reporting.TextBox
detailsTxt.Size = New SizeU(Unit.Inch(1.05), Unit.Inch(0.2))
detailsTxt.Location = New Drawing.PointU(Unit.Inch(iniLeft), Unit.Inch(0))
detailsTxt.Style.Font.Size = New Unit(10)
detailsTxt.Style.VerticalAlign = VerticalAlign.Middle
detailsTxt.Style.TextAlign = HorizontalAlign.Left
detailsTxt.StyleName = "Data"
detailsTxt.CanGrow = True
detailsTxt.TextWrap = True
detailsTxt.Multiline = True
detailsTxt.Value = "=Fields.[" + col.ColumnName.ToString & "]"
iniLeft = iniLeft + iniWidth
Here the output xls file link
From the provided source code it seems the items are correctly positioned, but the generation of additional rows depends on the height of the report sections as well. This code sets the height of the text boxes to 0.2 inch, but if the report section is 0.3 inch high, the difference of 0.1 inch will be represented as a new row in Excel export. The engine generates such row in order to preserve the designed report layout.
I have made a small report based on the provided code with a sample CSV data. You can see since the report detail section is 0.2 inch no additional rows are generated. However, on the group header row there is a very thin generated row (index 3), which is due to the location of the headerTxt textbox. It is positioned at 0.02 inch from the top, which produces the new row. The solution is to adjust the report items so they won't have any gaps between them and their containers (report sections). The produced Excel file is also included in the archive.
I hope you will find the attached example useful.