在WPF中使用水晶报表

在WPF中不能直接使用拖拽使用 CrystalReportViewer 可以使用下面的代码实现

                CrystalReportViewer rptViewer = new CrystalReportViewer();

                WindowsFormsHost host = new WindowsFormsHost();
                rptViewer.ReportSource = crystalreport;
                host.Child = rptViewer;
                ReportGrid.Children.Add(host);

原文地址:https://www.cnblogs.com/yshic/p/2946372.html