【问题标题】:Crystal Report issues for rpt file not load after iis publishiis 发布后无法加载 rpt 文件的 Crystal Report 问题
【发布时间】:2015-06-30 13:15:53
【问题描述】:

第一个report.Load("C:\Report\exam.rpt") 此路径在网站文件夹之外C:\Report\exam.rpt 将生成报告。

但是report.Load(Server.mapPath("~\Report\exam.rpt")) 出现了一些错误

在 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) 在 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load 的 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() 加载报告失败。 (字符串文件名)`

如何解决这个问题?

【问题讨论】:

  • 我认为~\Report\exam.rpt 不会转换为物理路径 C:\Report\exam.rpt。 ~ 可能会转换为 Web 应用程序的物理路径。

标签: asp.net iis-7.5


【解决方案1】:

Server.mapPath() 获取您的应用程序路径。提供 report.Load() 的完整路径或将您的 .rpt 文件放在您的项目解决方案中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-31
    • 2011-03-15
    • 2012-02-05
    • 2014-07-28
    相关资源
    最近更新 更多