【原】水晶报表 Invalid export DLL or export format bug

来源:互联网 发布:淘宝招牌全屏代码 编辑:程序博客网 时间:2024/04/29 01:43

这两天一直在为这个bug而烦恼,今天终于解决了,真的有种难以言喻的快感。不过我也想写下解决的方案,希望能够帮助那些苦闷的人吧。同时也是帮助我自己。当然,在此我也要感谢网络上的各位朋友,谢谢你们的帮助,发帖。

       和很多人遇到的问题一样,在水晶报表导出的时候,自带了office的word,excel还有pdf等等,其他的导出都是ok的,只有excel会有问题。

       我像一只无头苍蝇,不知道从哪里下手,所以不停的百度,谷歌,在此我终于觉得谷歌的信息要比百度的多很多。只是善意的提示下下,很多问题也许在百度找不到可以去谷歌。

       https://forums.sme.sap.com/thread.jspa?threadID=1065075&start=0&tstart=0这个是我SAP网站帮助。很有用哦。

这段话很有用,是上面的原话,怕大家不看。

 

"Invalid export DLL or export format" with Crystal Reports 2008
Posted: Sep 27, 2008 12:36 AM  
Click to report abuse...  Click to reply to this thread Reply

I've included this sticky because we are seeing many posts in this forum regarding the error Invalid export DLL or export format when exporting to Excel and RTF in .NET applications using the Crystal Reports 2008 .NET SDK.
Issue
- Exporting a Crystal Report to Excel or RTF format
- .NET application using the Crystal Reports 2008 runtime (version 12.0)
- error Invalid export DLL or export format
We've been doing some testing in-house and haven't reproduced this behavior. In order to figure this issue out we will need your help. If you are getting this error please reply to this post with the following information:
- Server Operating System
- Version of the .NET Framework
- How did you deploy?
- If you deployed with CRRuntime_12_0_mlb.msi - what was the date of the file and its size?
- What is the file version of crpe32.dll on your server? You'll find this in the C:/Program Files/Business Objects/BusinessObjects Enterprise 12.0/win32_x86 directory
- How many libpng10.dll files are on your system? List all instances.
- Any additional comments


What We Know
- The error invalid export DLL or export format may occur when exporting to Excel and RTF formats in .NET applications utilizing the Crystal Reports 2008 runtime (v 12.0)
- Other export formats like Adobe PDF, Crystal Reports, CSV all export with no error
- Some customers have resolved this by adding C:/Program Files/Business Objects/BusinessObjects Enterprise 12.0/win32_x86 to their environment path variables. Note the system must be restarted after editing the path variable.
- This may have something to do with the file libpng10.dll. Both crxf_xls.dll and crxf_rtf.dll are dependent on it.
- libpng10.dll has changed versions from SP0 to SP1. In SP0 it was 1.0.30.0 and in SP1 it is 1.0.30.1
libpng10.dll dependencies
The dependencies have also been updated for libpng10.dll in service pack 1. This may have something to do with the export issue. If you've deployed your application with the latest merge modules or setup package for service pack 1 you'll want to make sure you have version 1.0.30.1 of libpng10.dll.
Version 1.0.30.0
- zlib.dll
- msvcr71.dll
- kernel32.dll
Version 1.0.30.1
- boezlib.dll
- msvcr80.dll
- kernel32.dll

Thanks in advance for your co-operation. We hope to figure out what is causing this issue soon.
Edited by: David Hilton on Jan 14, 2009 10:07 AM


差不多解决的方案就在里面。

1) Use Microsoft ODBC Driver for Oracle
2) Add C:/Program Files/Business Objects/BusinessObjects Enterprise 12.0/win32_x86 to the environment path variables
3) Back up the libpng10.dll in C:/oracle/product/11.1.0/db_1/bin and replace it with the libpng10.dll from c:/program files/business objects/businessobjects enterprise 12.0/win32_x86
4) Ensure that the reg key HKEY_LOCAL_MACHINE/SOFTWARE/Business Objects/Suite 12.0/Crystal Reports/Path has a path value of; C:/Program Files/Business Objects/BusinessObjects Enterprise 12.0/win32_x86
(在开始,运行-》regedit)其实主要是你安装的crystal reports是不是在C盘,可能是安装在别的盘。

第二,发生这种错误的原因可能是和使用oracle数据库有关,所以,要把libpng10.dll 复制到oracle的目录下面,

还要复制到C:/WINDOWS/system,C:/WINDOWS/system32,C:/Documents and Settings/Administrator/My Documents/Visual Studio 2005/Projects,C:/Documents and Settings/Administrator/My Documents/Visual Studio 2008/Projects/VSMacros80下面就可以了。看下你能不能实现吧,我能实现了,如果还有其他的方案给我留言。谢谢。