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

本文详细介绍了在使用水晶报表(Crystal Reports 2008)进行Excel导出时遇到的“Invalid export DLL or export format”错误的解决方案。通过调整环境变量路径、替换libpng10.dll文件等步骤,成功解决了导出问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这两天一直在为这个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下面就可以了。看下你能不能实现吧,我能实现了,如果还有其他的方案给我留言。谢谢。

<think>嗯,用户遇到了“invalid command name 'export'”的错误,这看起来像是他们在命令行中尝试执行了`export`命令,但系统不识别这个命令。首先,我需要确认`export`是什么情况下使用的。 `export`命令通常是在Unix/Linux的shell环境中使用的,比如Bash或Zsh,用来设置环境变量。如果用户在Windows的命令提示符(CMD)中直接运行`export`,那肯定会报错,因为CMD不支持这个命令。同样,如果在PowerShell中直接使用`export`,也会有问题,因为PowerShell的语法不同。 接下来,我需要回忆一下不同操作系统中的环境变量设置方法。对于Windows的CMD,应该使用`set`命令,比如`set VARIABLE=value`。而在PowerShell中,设置环境变量可能需要使用`$env:VARIABLE = "value"`或者`[Environment]::SetEnvironmentVariable`方法。如果用户是在某个脚本或工具中运行这些命令,比如Makefile或者某些配置脚本,可能需要检查他们使用的环境是否正确。 另外,用户提到的错误信息“invalid command name 'export'”可能出现在某些特定的上下文中,比如在Expect脚本或者Tcl脚本中,因为`export`并不是Tcl的命令。这时候,用户可能误将shell命令写到了其他脚本语言中,导致解释器无法识别。需要检查他们是在哪个环境中运行这个命令的,以及脚本的语法是否正确。 还有可能用户在Dockerfile或者某些配置文件里错误地使用了`export`命令,比如在Dockerfile中,每个RUN指令都是独立的shell会话,所以如果他们在同一个RUN中设置变量,可能需要用`&&`连接命令,或者使用ENV指令来设置环境变量。 根据用户提供的引用内容,特别是引用[1]中提到的导出环境变量的例子,用户可能在遵循某个安装指南,其中要求先设置环境变量。但如果在执行这些导出命令时选错了命令行工具,比如在CMD中运行,就会出现问题。这时候需要指导用户切换到正确的shell环境,或者使用适合当前系统的命令。 总结可能的解决方案:首先确认用户的操作系统和使用的shell类型,然后指导他们使用正确的命令来设置环境变量。如果是脚本中的问题,检查脚本的解释器是否正确,或者是否有语法错误。同时,提醒用户在设置变量后如何验证是否成功,比如使用`echo`或`printenv`来查看变量值。</think>### 解决 `invalid command name 'export'` 的方法 #### 问题因 `export` 是 Unix/Linux 系统 Shell(如 Bash、Zsh)中设置环境变量的命令。若在以下场景中使用,会触发此错误: 1. **Windows 命令提示符(CMD)**:CMD 不支持 `export` 命令。 2. **未正确进入 Shell 环境**:例如在 Tcl、Expect 脚本中直接调用 `export`。 3. **语法错误**:命令格式不符合当前运行环境的要求。 --- #### 分步解决方案 ##### 1. 确认操作系统和运行环境 - **Unix/Linux/macOS**:在终端中使用 `export`(如 Bash/Zsh)。 - **Windows**: - **CMD**:使用 `set` 命令,例如: ```cmd set VARIABLE=value ``` - **PowerShell**:使用 `$env:` 语法,例如: ```powershell $env:VARIABLE = "value" ``` - **WSL**:在 Windows Subsystem for Linux 中可使用
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值