升级至OEM 2020 CR Runtime 64位后新服务器运行Crystal Reports报错求助
错误信息
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {C0C99FA5-E1D3-494E-BE0C-73C19424F91C} failed due to the following error: 8007007f The specified procedure could not be found. (Exception from HRESULT: 0x8007007F).
已确认事项
- SAP Crystal Report Application Server OEM 2020已安装、授权且运行正常,可连接对应端口,Configuration Manager工具中服务处于运行状态
- Web服务器已安装对应版本的64位CR Runtime组件
- IIS Web应用运行正常,且为64位(应用程序池中“启用32位应用程序”设为False),除Crystal Reports集成外所有页面及内容均可正常使用
- 已为SQL Server创建64位ODBC连接,ASP.NET Web应用其余部分可正常使用该连接获取数据,确认使用了正确的DBMS和架构等
- 已按照SAP官网2020 OEM版PDF说明安装对应版本的VS Redist
排查与解决步骤
严格匹配CR Runtime与Application Server版本
卸载当前64位CR Runtime,重新安装与SAP Crystal Report Application Server OEM 2020**版本号完全一致(含补丁)**的Runtime组件,版本不匹配是COM组件调用失败的常见原因。手动注册缺失的COM组件
以管理员身份打开命令提示符,执行以下命令(路径需根据实际安装目录调整):regsvr32 "C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\crtslv.dll" regsvr32 "C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\craxdrt.dll"执行后确认组件注册成功提示。
调整IIS应用程序池权限
确保应用程序池的身份账户(如ApplicationPoolIdentity或自定义账户)对以下目录拥有对应权限:- Crystal Report安装目录(默认
C:\Program Files (x86)\SAP BusinessObjects):读取、执行权限 - 系统临时目录(
C:\Windows\Temp):读写权限
- Crystal Report安装目录(默认
修复Crystal Report相关安装
打开控制面板→程序和功能,分别对SAP Crystal Report Application Server OEM 2020和CR Runtime组件执行“更改→修复”操作,确保所有文件、注册表项完整。配置系统环境变量PATH
检查系统环境变量PATH是否包含以下64位运行目录,未包含则手动添加后重启服务器:C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet
验证报表文件兼容性
确认.rpt报表文件是用与当前Runtime版本兼容的Crystal Report设计器创建的,尝试将旧版本报表重新保存为2020版本格式后再测试。
内容的提问来源于stack exchange,提问作者nothingisnecessary

