Visual Studio 2017中的RDLC奇怪的编辑器

时间:2019-03-27 02:11:08

标签: visual-studio visual-studio-2017 rdlc

我有一个rdlc(定义为2010),并试图在Visual Studio 2017(社区)中对其进行编辑。

当我在设计器中打开它时(这是一个单独的扩展,需要安装)

它要求我将RDLC更新到最新版本。

更新RDLC之后,我可以在Visual Studio 2017中对其进行编辑。

但是无法渲染已编辑的RDLC(定义更新至2016年)

http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition

如果我选择进行更新,则报告查看器可以正确显示报告。

然后我尝试搜索为什么reportViewer无法呈现定义2016 RDLC。

我发现Visual Studio 2017中的reportViewer版本是版本12。

根据网络信息,最新版本的报表查看器为14。

我发现实际上没有办法将报表查看器更新为14(至少在社区版本中)。

我很好奇为什么Visual Studio 2017的处理如此糟糕

RDLC 设计器迫使我们在Visual Studio 2017中将RDLC更新为2016定义

但是无法更新查看器以使用2016年定义呈现报告

已安装的东西: enter image description here enter image description here enter image description here

设计器让我尝试在VS2017中查看RDLC时进行更新 enter image description here

更新的RDLC无法在ReportViewer中呈现

如果选择不更新,则可以显示reportViewer,但是设计者无法查看和编辑RDLC enter image description here

1 个答案:

答案 0 :(得分:0)

在Visual Studio 2017中,RDLC有一些不同的组件。

设计师

作为扩展安装-您需要使用它来编辑报告。我了解这就是您已经拥有的:
Microsoft Rdlc Report Designer for Visual Studio(marketplace.visualstudio.com)

项目/向导

一个单独的扩展名。将项目和向导添加到用于创建新项目/报告的Visual Studio中。

Microsoft Reporting Services Projects(marketplace.visualstudio.com)

扩展链接仅用于说明目的,您可以在Visual Studio中找到它们,
工具->扩展和更新->在线。

ReportViewerControl

对于每个使用ReportViewer的项目,您都需要ReportViewerControl NuGet包来为您提供更新的查看器:

对于 Winforms (或通过WindowsFormsHost(docs.microsoft.com) WPF ):

Microsoft.ReportingServices.ReportViewerControl.Winforms(nuget.org)

对于 ASP.Net (从未使用过):

Microsoft.ReportingServices.ReportViewerControl.WebForms(nuget.org)

同样,仅用于阐明链接,您可以在Visual Studio中找到:
工具-> NuGet软件包管理器->管理解决方案的NuGet软件包->浏览。

注意:请确保安装正确的nuget软件包。如果您来自VS2015,则可能以前已经安装了非官方的软件包。仔细检查名称(如果需要确认,请检查链接)。下面的屏幕截图:

enter image description here

其他信息

Integrating Reporting Services Using the Report Viewer Controls - Get Started(docs.microsoft.com)

相关问题