Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Report created by ReportViewer shows in Excel an error message

If I generate an excel-report, excel 2010 shows the following warning message:

file error: data may have been lost

Note: I already have found the solution and will post it immediately. I make this entry for other people having the same error.

like image 416
HCL Avatar asked Aug 29 '11 12:08

HCL


2 Answers

It turned out, that the reports data source had in a value of -0 (negative zero). The datatype was decimal. Excel can not handle this.
The problem seems to lie in the Excel formula engine and not in the report renderer (However I think MS has to solve the problem in the report renderer).

http://connect.microsoft.com/SQLServer/feedback/details/680863/negative-zero-causes-file-error-data-may-have-been-lost-in-excel-2010-when-exporting-ssrs-report

like image 68
HCL Avatar answered Oct 25 '22 00:10

HCL


I was facing similar issue where I changed embedded images into external images. In this change some of the images Bit depth property remain as 32 (Click on Property -> Details tab).

I changed it Bit depth to 24 by using imagemagick utility (http://www.imagemagick.org/script/binary-releases.php).

I used "convert -depth 24 oldimage.bmp newimage.bmp" command to change Bit depth property.

And this solve my problem.

I know this is not solution for your problem. But if somebody come across this post while searching that might help them.

like image 43
Rahul Techie Avatar answered Oct 25 '22 00:10

Rahul Techie