【问题标题】:How can I add ReportViewer control in WPF windows如何在 WPF 窗口中添加 ReportViewer 控件
【发布时间】:2023-01-26 07:06:39
【问题描述】:

在我的 Xaml 代码中,我试图以这种方式添加 ReportViewer 控件:

<WindowsFormsHost Height="410" Width="749">
        <rdlcreport:ReportViewer x:Name="_reportviewer" />
</WindowsFormsHost>

但是我有以下消息的例外:WPF 项目不支持 ReportViewer。我该如何解决这个问题?我正在使用 VS2022 和 C# WPF。谢谢你的帮助。

【问题讨论】:

    标签: wpf rdlc


    【解决方案1】:

    我是WPF的新手,所以我逐渐发现我的错误,似乎问题出在XAML窗口中的以下指令中:

    xmlns:rdlcreport="clr-namespace:Microsoft.Reporting.WinForms;assembly=Microsoft.ReportViewer.WinForms"
    

    我必须在此代码中更正什么?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-15
      • 2023-03-10
      • 2013-07-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多