且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Visual Studio 2017中设计WPF报告?

更新时间:2022-12-22 10:17:54

Visual Studio 2017通过Windows Forms Report(ing)控件支持RDLC。



您可以设计在WPF中看到的任何报告。和WYSIWYG。



你有边框和文字(块)。你还需要什么?



报告甚至可以作为数据录入表格,反之亦然。
Visual Studio 2017 supports RDLC via the Windows Forms Report(ing) control.

You can design any report you see in WPF. And WYSIWYG.

You got borders and text (blocks). What more do you need?

The "report" can even function as a data entry form and vise versa.


问题是:

默认情况下,Visual Studio 2017不提供Windows窗体报表查看器。



您必须安装名为Microsoft的NuGet包。 Report.Viewer然后将Report Viewer控件添加到Visual Studio工具栏。



详细说明可在此处找到:

ReportViewer 2016控件入门 - SQL Server Reporting Services(s-s-rS) Microsoft Docs [ ^ ]

关注将Report Viewer控件添加到新的Windows窗体项目
The problem is:
Visual Studio 2017 does not offer the Windows Forms Report Viewer by default.

You must install a NuGet package called Microsoft.Report.Viewer and then add the Report Viewer control to the Visual Studio toolbar.

A detailed instruction can be found here:
Getting started with the ReportViewer 2016 control - SQL Server Reporting Services (s-s-rS) | Microsoft Docs[^]
Follow the chapter "Adding the Report Viewer control to a new Windows Forms project"