问题描述
大家好。
我为VS2010 Pro创建Crystal Report并收到很多错误。这只是错误列表中66个错误中的前5个:
I create Crystal Report for VS2010 Pro and get a lot of errors. That is just first 5 of 66 errors from error list:
错误 8类型'ReportClass'未定义。
错误9属性'ResourceName'不能声明为'Overrides',因为它不会覆盖基类中的属性。
错误10属性'NewGenerator'不能声明为'Overrides',因为它不会覆盖基类中的属性。
错误11属性'FullResourceName'不能声明为'覆盖',因为它不会覆盖基类中的属性。
错误12键入'CrystalDecisions。 CrystalReports.Engine.Section'未定义。
我有一些在VS2008中创建然后转换为VS2010的报告,我没有任何问题。但这是我第一个由VS2010创建并尝试创建Crystal Report的项目,但在构建项目之后,我收到了大量错误。在我的机器上我安装了 Crystal报告VS2010 - CRforVS_13_0.exe 。如何解决这个问题?
I have some reports that was create in VS2008 and then converted to VS2010 and I don't have any problems. But that is first project that I created by VS2010 and try create Crystal Report but after build project I got huge list of errors. In my machine I installed Crystal Report for VS2010 - CRforVS_13_0.exe. How to fix that problem?
谢谢。
推荐答案
"'ReportClass'是没有定义。"意味着它无法在任何已知(包含)命名空间中找到它,因此引用定义对象的CR dll时出现问题。
"'ReportClass' is not defined." means it can't find it in any of the known (included) namespaces, so something went wrong with referencing the CR dll that defines the objects.
另一个问题可能是,尽管你可以包括引用,它是.net4,您的构建设置为.net 4 Client Profile。换句话说,检查您的项目属性,看看您是否使用相同的"目标框架"。选择参考
中的参考和属性中的 ,查看运行时版本的内容。
Another issue may be, although you can include the reference, it is for .net4 and your build is set to .net 4 Client Profile. In other words, check your project properties, to see if you are using the same "Target framework". Select the Reference in References and in properties, see what Runtime version is says.
祝你好运,
Pedro
Good luck,
Pedro
这篇关于VS2010项目问题与水晶报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!