BUG: You receive an "Unable to read file" error message in Excel when you try to export a report in SQL Server 2000 Reporting Services (888531)



The information in this article applies to:

  • Microsoft SQL Server 2000 Reporting Services

Bug #: 307358 (SQL BU Defect Tracking)

SYMPTOMS

In Microsoft SQL Server 2000 Reporting Services, when you try to export a report to Microsoft Excel by choosing Excel as the export format, you receive the following error message in Excel when you open the file:
Unable to read file.

CAUSE

This behavior occurs when you try to export a report that exceeds the limit of 8,228 cell bytes within each 32-row group of the report. The cell byte limit is calculated by using the following formula:

NumberOfRows * NumberOfColumns * 2 = CellBytes

For example, the cell byte limit is exceeded in the following reports:
  • The report has 129 columns and more than 32 rows (32 * 129 * 2 = 8,256 bytes).
  • The report has 212 columns and more than 21 rows (21 * 212 * 2 = 8,904 bytes).
Note If a report has more than 32 rows, the report is split into 32-row groups and the cell byte limit is applied to each 32-row group.

WORKAROUND

To work around this behavior, you must either reduce the number of columns that are returned or you must reduce the number of rows that are returned. To determine whether the result set returned to the report is within the cell byte limit, use the following formula:

NumberOfRows * NumberOfColumns * 2 = CellBytes <= 8,228

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the behavior

  1. Create a table with more than 129 columns in a SQL Server database.
  2. Insert more than 32 rows into the new table without null values.
  3. Create a new report with the new table that shows all 129 columns in a table.
  4. Deploy the new report.
  5. Open the new report in Microsoft Internet Explorer.
  6. In the Select a format list, click Excel, and then click Export.
  7. In the File Download dialog box, click Open.

    You receive the error message that is mentioned in the "Symptoms" section.
For more information about SQL Server 2000 Reporting Services, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:11/23/2004
Keywords:kbpending kbtshoot kbbug KB888531 kbAudDeveloper