ReportViewer 创建的报表在 Excel 中显示错误消息
如果我生成 Excel 报告,Excel 2010 将显示以下警告消息:
文件错误:数据可能已丢失
注意:我已经找到解决方案并将发布它立即地。我为其他有同样错误的人做了这个条目。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
事实证明,报告数据源的值为 -0(负零)。数据类型为
十进制
。 Excel 无法处理此问题。问题似乎在于Excel公式引擎而不是报表渲染器(但是我认为MS必须解决报表渲染器中的问题)。
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
我遇到了类似的问题,我将嵌入图像更改为外部图像。在此更改中,某些图像的位深度属性保留为 32(单击属性 -> 详细信息选项卡)。
我使用 imagemagick 实用程序 (http://www.imagemagick.org/script/binary-releases.php) 将其位深度更改为 24。
我使用“convert -depth 24 oldimage.bmp newimage.bmp”命令来更改位深度属性。
这解决了我的问题。
我知道这不能解决您的问题。但如果有人在搜索时看到这篇文章,这可能会对他们有所帮助。
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.