Sample Header Ad - 728x90

Why is this SSRS Report rounding a BIGINT Value to the nearest Thousandth when exporting to Excel?

4 votes
3 answers
2005 views
I have a SQL Server Reporting Services (SSRS) 2012 report that is populated via stored procedure (SP). The SP returns various fields, one of which is a BIGINT datatype. When I execute the SSRS report directly the value is properly displayed, but when I export the output to Excel, it gets rounded to the nearest thousandth. For instance, this is an example of what I'm seeing. The proper value: 480758225903628660 The value shown in the Excel File: 480758225903629000 It's rounding **8660** to **9000**. Truly frustrating, and [Microsoft's documentation](https://learn.microsoft.com/en-us/sql/reporting-services/report-builder/exporting-to-microsoft-excel-report-builder-and-ssrs) mentions nothing about this behavior. I've also dug everywhere on the report that I can think of that may affect this, such as the Text Box Properties: enter image description here ...the Placeholder Properties: enter image description here ... and the Value of the field itself: enter image description here I can "fix" it by converting the field to a string by wrapping the field value in a [CStr() or .ToString()](https://learn.microsoft.com/en-us/sql/reporting-services/report-design/data-types-in-expressions-report-builder-and-ssrs) function, but that also treats the output as a string and not a number. Is there a way to export this to Excel so that the rounding doesn't occur but still keeps this value numeric?
Asked by John Eisbrener (9547 rep)
Aug 18, 2017, 02:45 PM
Last activity: Jun 21, 2022, 07:27 PM