Question

I am very new to SSRS and am trying to generate a report using SSRS, I am able to pull the data on to the screen without any issues but when I try to export the data to an excel file, I am getting an error "The row item structure object corresponding to a line cannot be null" when there is data that spans multiple tabs in an excel. I am able to export to any other formats eg: PDF. After some googling I found that there is an issue with the SQL Server reporting version and Microsoft mentioned that they will release a patch to fix this issue but I dont see that there was any patch. I am using SQL Server Reporting Services Version 2007.0100.2531.00. Any pointers will be of great help.

Was it helpful?

Solution 3

Depending on the version of SSRS you're using, it might be the problem described in this post on Microsoft Connect, which should be fixed in later versions of SSRS.

Also, it can be something with page breaks, or, as in my case, matrixes without data. When I hid the matrix without data (with =CountRows("MyDataSet") = 0), the problem was solved.

OTHER TIPS

If you have group in report then track below changes.

  • Right click Row group

  • Group Properties

  • Page Breaks

  • Remove checkbox from Also at the start of a group

  • Remove checkbox from Also at the end of a group

  • OK

I have found the solution for the above issue, please don't provide the page break to table. Do one thing: put the table in to the rectangle and provide page break to rectangle. It worked for me.

The bug seems to appear every time you try to render completely empty pages (height = 0) in Excel. The problem is still there in SQL Server 2008R2 Reports, the Microsoft Connect Ticket mentioned by Peter is still active.

In my case I had a report with a single Tablix and no page breaks, no space on any side, so that no additional rows or columns would be created in Excel exports. When the report returns no rows and is rendered to Excel the stated error appears, so I added a new empty row with the visibility condition "=CountRows() > 0" and it works.

If all else fails, just create a dummy tablix in between the two tablixes that you wish to insert a page break. Have that tablix be one row, one column long and have its dataset be something like "select ' ' as EmptyDataset". Make that "in between tablix" have a "Page Break After" setting. Viola - the export works fine in Excel, and you can't see the "in between tablix". If the tablix is set to hidden, I don't believe the Page Break will work successfully.

I know this is an old question, but leaving this here in case someone else has this problem, since the solution that worked for me isn't listed here.

First of all: the cause of the problem, in my case, was trying to generate a report with an empty matrix (data source had zero rows). This works when exporting report to PDF, but fails when exporting to Excel.

To fix the problem, I just had to set a message in the matrix's property NoRowsMessage, like in this screenshot: enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top