2013-11-15 24 views
0

全部我按照Here的指南并结合SAP Crystal Reports for EnterpriseSAP Crystal Server 2013 SP1 Client Tools一起工作。所有这些都安装没有问题。但是我从Sap Crystal Reports for Enterprise构建的每个报告都无法加载到我的测试vs2010 Web项目中。无法为SAP Crystal Server 2013加载报告评估

所以我想知道这两者是否可以很好地协同工作。因为我的测试代码非常简单。但不幸的是它失败了。我一直在研究它几天。但没有得到它的工作。代码和例外如下所示。请帮助查看。

protected void Page_Load(object sender, EventArgs e) 
    { 
     ReportDocument rpt = new ReportDocument(); 
     rpt.Load(Server.MapPath("~/test123.rpt")); // This line failed. 
     System.Console.Write("ok!!!"); 

    } 

异常说:

Load report failed. 

    Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack. 

    Source: CrystalDecisions.CrystalReports.Engine 

     at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() 

     at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) 

     at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) 

     at _Default.Page_Load(Object sender, EventArgs e) in f:\Study\VS2010\WebSite3\Default.aspx.cs:line 16 

     at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 

     at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 

     at System.Web.UI.Control.OnLoad(EventArgs e) 

     at System.Web.UI.Control.LoadRecursive() 

     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

我错过了什么或做什么了吗?如果有请告诉我。谢谢。

回答

0

我会尝试安装Crystal Reports for Visual Studio运行时,然后尝试它。可以在这里找到下载地址:http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_7.exe

+0

正如我迄今所知道的,CR for Enterprise生成的报告不能像使用CR sdk for .net那样通过常规方式填充,推荐的方法是使用RESTful API或URL打开。如果你遇到类似上面的问题,我希望这个评论对你有帮助。谢谢。 –