在CrystalReports for VS2005中调用ReportDocument.Load() [英] Calling ReportDocument.Load() in CrystalReports for VS2005

查看:88
本文介绍了在CrystalReports for VS2005中调用ReportDocument.Load()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!


我正在迁移2003年到2005年的解决方案,其中包含一些报告。


我有以下代码:


ReportDocument report = new ReportDocument();


...


report.Load(" myreport.rpt",OpenReportMethod.OpenReportByTempCopy);


根据SDK文档,此方法有2个重载:


ReportDocument.Load(string)


ReportDocument.Load(string,CrystalDecisions.Shared.OpenReportMethod)


编译时,我得到了他跟随错误:


类型'CrystalDecisions.Enterprise.InfoObject'在程序集中定义没有引用。您必须添加对程序集"CrystalDecisions.Enterprise.InfoStore,Version = 10.2.3600.0,Culture = neutral,PublicKeyToken = 692fbea5521e1304"的引用。


"CrystalDecisions.Enterprise.EnterpriseSession"类型定义于未引用的程序集。您必须添加对程序集"CrystalDecisions.Enterprise.Framework,Version = 10.2.3600.0,Culture = neutral,PublicKeyToken = 692fbea5521e1304"的引用。


Intellisense还报告5个不同的重载而不是2 - 其中一些重载指的是CrystalDecisions。企业对象:


ReportDocument.Load(string filename)


ReportDocument.Load(CrystalDecisions.Enterprise.InfoObject infoObject,CrystalDecisions.Enterprise.EnterpriseSession enterpriseSession)


ReportDocument.Load(string filename,CrystalDesicions.Enterprise.EnterpriseSession enterpriseSession)


ReportDocument.Lo ad(string filename,CrystalDecisions.Shared.OpenReportMethod openMethod)


ReportDocument.Load(string filename, string reportAppServer)


编译器可能需要引用CrystalDecisions.Enterprise-能够解决正确重载方法的东西。并且,据我所知,这些组件不是作为VS2005的一部分提供的。


有关如何解决此问题的任何想法都表示赞赏。 :)


问候,


sigurdr

解决方案

不提供第二个参数,它将使用临时副本,其他选项如果您有企业产品

Hi!

I'm migrating a solution from 2003 to 2005, which contains some reports.

I've got the following code:

ReportDocument report = new ReportDocument();

...

report.Load("myreport.rpt",OpenReportMethod.OpenReportByTempCopy);

According to the SDK doc this method has 2 overloads:

ReportDocument.Load(string)

ReportDocument.Load(string, CrystalDecisions.Shared.OpenReportMethod)

When compiling, I get the following errors:

The type 'CrystalDecisions.Enterprise.InfoObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'CrystalDecisions.Enterprise.InfoStore, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'. 

The type 'CrystalDecisions.Enterprise.EnterpriseSession' is defined in an assembly that is not referenced. You must add a reference to assembly 'CrystalDecisions.Enterprise.Framework, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'. 

Intellisense also reports 5 different overloads instead of 2 - where some of the overloads refers to CrystalDecisions.Enterprise objects:

ReportDocument.Load(string filename)

ReportDocument.Load(CrystalDecisions.Enterprise.InfoObject infoObject, CrystalDecisions.Enterprise.EnterpriseSession enterpriseSession)

ReportDocument.Load(string filename, CrystalDesicions.Enterprise.EnterpriseSession enterpriseSession)

ReportDocument.Load(string filename, CrystalDecisions.Shared.OpenReportMethod openMethod)

ReportDocument.Load(string filename, string reportAppServer)

The compiler probably needs the reference to the CrystalDecisions.Enterprise-things to be able to resolve correct overloaded method. And, these assemblies are not shipped as part of VS2005 as far as I can see.

Any ideas on how to resolve this is appreciated. :)

Regards,

sigurdr

解决方案

Don't supply the second parameter and it will use the temp copy, the other options are if you have the enterprise product


这篇关于在CrystalReports for VS2005中调用ReportDocument.Load()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆