FIX: "System.OverflowException: Value was either too large or too small for an Int32" error message occurs when you try to generate a report in Microsoft SQL Server 2008 R2 Reporting Services

Article translations Article translations
Article ID: 2359606 - View products that this article applies to.
Microsoft distributes Microsoft SQL Server 2008 R2 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • You have a Report Definition Language (RDL) file that contains a Tablix control in Microsoft SQL Server 2008 R2 Reporting Services.
  • You add a row group or a column group to the Tablix control, and then set a group expression to the group data by using a column that has a numeric data type.
  • This column contains a value that is not in the range of the Int32 data type. For example, a value of the column is 9000001777400270.
In this scenario, you receive the following error message when you try to generate the report:
An error occurred during local report processing.
An error has occurred during report processing.
Value was either too large or too small for an Int32.

RESOLUTION

Cumulative update information

SQL Server 2008 R2

The fix for this issue was first released in Cumulative Update 4. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
2345451 Cumulative Update package 4 for SQL Server 2008 R2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981356 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

WORKAROUND

To work around this issue, convert the numeric data type to the Double data type or to the Int64 data type. To do this, follow these steps:
  1. Double-click the group in the Row Groups or Column Groups pane to open the Group properties.
  2. On the General tab, change the group expression to the following System.Double data type expression:
    CDbl(Fields!<Field Name>.Value)
    Or, change the group expression to the following System.Int64 data type:
    CLng(Fields!<Field Name>.Value)

STATUS

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

REFERENCES

For more information about data types, visit the following websites:
General information about the "Decimal" structure
General information about the "Int32" structure
General information about the "Int64" structure
General information about the "Double" structure

Properties

Article ID: 2359606 - Last Review: October 18, 2010 - Revision: 1.0
APPLIES TO
  • Microsoft SQL Server 2008 R2 Reporting Services
Keywords: 
kbqfe kbfix kbexpertiseadvanced kbsurveynew KB2359606

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com