【问题标题】:need help on Using and Publishing rdlc file需要有关使用和发布 rdlc 文件的帮助
【发布时间】:2019-10-06 03:26:04
【问题描述】:

我需要有关在 VS 2017 环境中创建的 Windows 应用程序中使用 rdlc 文件的帮助。

我在Publishing RDLC files 上读到了类似的内容,但不确定如何使用 ReportPath,我当前的代码如下,并且在我的机器上的 Visual Studio 中运行良好,我确信部署后它不会在客户的机器上运行。

MyRptViewer.LocalReport.ReportPath = Application.StartupPath + "/Reports/MyReport.rdlc";

安装时是否会创建 Reports 文件夹并将 .rdlc 文件复制到本地计算机?

如果有人可以指导我,我将不胜感激。

谢谢。

【问题讨论】:

    标签: visual-studio-2017 rdlc reportviewer


    【解决方案1】:

    您可以将 rdlc 文件构建操作更改为“嵌入式资源”

    并使用 Me.ReportViewer1.LocalReport.ReportEmbeddedResource = "{AssemblyName}.{ReportName}.rdlc" , 这无需在安装时将报告复制到本地计算机即可工作

    【讨论】:

    • 在其他地方找到了这个解决方案,我应用了它,它就像魅力一样。非常感谢您的调查。
    猜你喜欢
    • 2011-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多