'CrystalDecisions.CrystalReports.Engine.ReportDocument'的类型初始值设定项引发异常 [英] The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception
问题描述
hi
在添加和删除引用,热修复和冷水淋洗6小时后,我终于找到了解决此错误的方法......
因为我很开心sh in sh * t我想与世界分享它(因为我发现在商业对象论坛和新闻组中都没有找到有关此主题的任何内容)。
我得到的错误: < span lang = EN-GB style ="font-size:10pt; color:black">
"CrystalDecisions.CrystalReports.Engine.CRPE"的类型初始值设定项引发了异常。
检索具有CLSID {11BD5260-15B6-412D-80DB-12BB60B8FE50的组件的COM类工厂}
我尝试过的事情:
- 一次删除并添加了一个水晶dll引用
- http://forums.microsoft.com/MSDN// ShowPost.aspx?PostID = 642627& SiteID = 1
Ran:C:\Program Files\Microsoft Visual Studio 8 \ SDK \v2.0 \ BootStrapper \Packages\CrystalReports \ CRRedist2005_x86.msi
- https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID= 137831& SiteID = 1 这里的建议是特定目标x86平台而不是'任何cpu':
转到您的应用程序项目,右键单击,然后选择"属性" ;
在"构建"选项卡上,找到"平台目标"组合框。它可能会说,"任何CPU"。将其更改为x86,您的项目将仅编译32位,从而消除了问题。
所有必需的dll存在于C:\Program Files \Common Files \ Business Objects \2.7 \ Managed folder?
我在网上找不到的东西:
http:// forums .microsoft.com / MSDN / ShowPost.aspx?PostID = 642627& SiteID = 1
运行C:\Pr ogram Files\Microsoft Visual Studio 8 \ Crystal Reports \CRRedist\X64 \ CRRedist2005_X64.msi
昨天工作正常吗?
我做错了什么,更具体的是我在过去24小时内做了什么?
诀窍是什么?
突然我记得我昨天卸载了一个包含CrystalDecisionsRedist2005_x86合并模块的2005项目!
我重新安装了项目,当调试器到达断点时,我的手指交叉:
Private crReportDocument 作为 新 ReportDocument
当我看到我的闪屏时,就像个婴儿一样哭!
< span lang = EN-GB style ="font-size:10pt; font-family:'Courier New'">奇怪的是,运行' C:\Program Files \ Microsoft Visual Studio 8 \ SDK \v2.0 \ BootStrapper \Packages \CrystalReports \ CRRedist2005_x86.msi'没有解决问题。 。
所以'用任何类型的合并模块卸载项目都会产生这些副作用'
有一个好的!
Mike
跨度>
hi
After 6 hours of adding and removing references, hot fixes and cold showers I finally found a solution to this error...
Cause I'm as happy as a pig in sh*t I want to share it with the world (and because there really isn't anything around I found useful regarding this subject neither on the businessobjects forum nor in the newsgroups).
Errors I got:
The type initializer for "CrystalDecisions.CrystalReports.Engine.CRPE"
threw an exception.
Retrieving the COM class factory for component with CLSID {11BD5260-15B6-412D-80DB-12BB60B8FE50}
Things I tried:
- Removed and added the crystal dll references one at a time
- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=642627&SiteID=1
Ran:C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports\ CRRedist2005_x86.msi- https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=137831&SiteID=1 suggestion here was to specificly target the x86 plaform instead of ‘any cpu’:
Go to your application project, right click, and select "Properties"
On the Build tab, find the Platform Target combo box. It probably says, "Any CPU". Change this to x86 and your project will compile for 32 bit only, thus eliminating the issue.
All required dll’s where present in the C:\Program Files\Common Files\Business Objects\2.7\Managed folder?
Things I didn’t try but found on the web :
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=642627&SiteID=1
Run C:\Program Files\Microsoft Visual Studio 8\Crystal Reports\CRRedist\X64\ CRRedist2005_X64.msi
It worked fine yesterday?
What did I do wrong, more specific what have I been up to the last 24 hours?
What did the trick?
Suddenly I remembered I uninstalled a 2005 project yesterday which included the CrystalDecisionsRedist2005_x86 merge module!
I re-installed the project kept my fingers crossed when the debugger hit the breakpoint at:
Private crReportDocument As New ReportDocument
And cried like a baby when I saw my splash screen!
It’s strange thought that running ‘C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports\ CRRedist2005_x86.msi’ didn’t fix the problem..
So ‘uninstalling a project with any kind of merge module can have these side effects’
Have a good one!
Mike
这篇关于'CrystalDecisions.CrystalReports.Engine.ReportDocument'的类型初始值设定项引发异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!