【问题标题】:Load Report Failed on client computer - Works on development system在客户端计算机上加载报告失败 - 在开发系统上工作
【发布时间】:2020-01-31 07:41:01
【问题描述】:

我可以很好地在我的开发系统上加载水晶报告。但是在第二台计算机上运行安装程序后,我得到“加载报告失败”。

我检查了以前的帖子,但还没有运气。我在 Visual Studio 2017 Visual Basic 中进行编码。我确实在远程计算机上安装了 Crystal 报告运行时,它帮助我克服了早期的错误,所以我想我已经接近了!任何想法/帮助表示赞赏! 经过一番挖掘,我硬编码了报告名称,但仍然不存在!

大量的网络搜索,在远程系统上安装运行时,并取得了进一步的进展。转移到硬编码报告名称/路径(在客户端计算机上确认 .rpt....我只需要 .rpt 或 .rpt 和 .dll(都尝试过但没有更改)。我尝试的每一个更改都可以在我的开发PC,但从未在客户端PC上。尝试了stackoverflow的大多数选项,但还没有运气。

 Dim dt As New DataTable  
 Dim tempstring As String  
 Dim ncomp As Integer  
 Dim xx As Integer  
 'Created data block to pass to CR as dt, works on dev't PC  
 Dim rptdoc As CrystalDecisions.CrystalReports.Engine.ReportDocument  
 rptdoc = New CRWheatAll  
 rptdoc.Load("c:\itgctest\CRWheatAll.rpt")  '.rpt is there on targe pc  
 rptdoc.SetDataSource(dt)  
 'view report in crystalreportviewer  
 Form5.CrystalReportViewer1.ReportSource = rptdoc  
 Form5.ShowDialog()  
 Form5.Dispose()  

【问题讨论】:

  • 发布错误消息时出现问题,这里是:********** 异常文本 ************** CrystalDecisions。 Shared.CrystalReportsException:加载报告失败。 ---> System.Runtime.InteropServices.COMException:文档尚未打开。在 CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.get_ReportAppServer() 在 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.get_ReportAppServer() 在 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
  • 如果您将整个 BIN 文件夹从您的开发机器复制到远程机器并运行 .exe 文件,那么它可以工作吗?如果是这样,那将消除一些问题。我认为这可能是安装程序问题 - 可能需要将一些文件复制到您正在安装它的机器上,例如.DLL

标签: visual-studio crystal-reports


【解决方案1】:

您必须在主机中安装 Crystal Reports Runtime。

例如: SAP Crystal Reports 13.0 运行时(64 位)

检查您在开发环境中选择了相同的版本。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-02-05
    • 2021-01-14
    • 1970-01-01
    • 1970-01-01
    • 2012-12-12
    • 2023-03-08
    • 1970-01-01
    相关资源
    最近更新 更多