I just started to write reporting software in new version of visual studio named visual studio 2017 RC but just noticed that core reportviewing tools is missing from both windows forms and WPF application template. Can anyone tell me why the reportviewer tool is disappeared from visual studio 2017 ? Really having trouble without it . Is there any alternate to work with this tool in new visual studio ?
This question is related to
c#
wpf
windows-forms-designer
visual-studio-2017
Please NOTE that this procedure of adding the reporting services described by @Rich Shealer above will be iterated every time you start a different project. In order to avoid that:
If you may need to set up a different computer (eg, at home without internet), then keep your downloaded installers from the marketplace somewhere safe, ie:
Fetch the following libraries from the packages or bin folder of the application you have created with reporting services in it:
Install the 2 components from 1 above
You are now good to go! ReportViewer icon will be added to your toolbar, and you will also now find Report and ReportWizard templates added to your Common list of templates when you want to add a New Item... (Report) to your project
NB: When set up using Nuget package manager, the Report and ReportWizard templates are grouped under Reporting. Using my method described above however does not add the Reporting grouping in installed templates, but I dont think it is any trouble given that it enables you to quickly integrate rdlc without internet and without downloading what you already have from Nuget every time!
Download Microsoft Rdlc Report Designer for Visual Studio from this link. https://marketplace.visualstudio.com/items?itemName=ProBITools.MicrosoftRdlcReportDesignerforVisualStudio-18001
Microsoft explain the steps in details:
The following steps summarizes the above article.
Adding the Report Viewer control to a new web project:
Create a new ASP.NET Empty Web Site or open an existing ASP.NET project.
Install the Report Viewer control NuGet package via the NuGet package manager console. From Visual Studio -> Tools -> NuGet Package Manager -> Package Manager Console
Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms
Add a new .aspx page to the project and register the Report Viewer control assembly for use within the page.
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
Add a ScriptManagerControl to the page.
Add the Report Viewer control to the page. The snippet below can be updated to reference a report hosted on a remote report server.
<rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote">
<ServerReport ReportPath="" ReportServerUrl="" /></rsweb:ReportViewer>
The final page should look like the following.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Sample" %>
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
<!DOCTYPE html>
<html xmlns="https://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server"></asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote">
<ServerReport ReportServerUrl="https://AContosoDepartment/ReportServer" ReportPath="/LatestSales" />
</rsweb:ReportViewer>
</form>
</body>
If you're like me and tried a few of these methods and are stuck at the point that you have the control in the toolbox and can draw it on the form but it disappears from the form and puts it down in the components, then simply edit the designer and add the following in the appropriate area of InitializeComponent() to make it visible:
this.Controls.Add(this.reportViewer1);
or
[ContainerControl].Controls.Add(this.reportViewer1);
You'll also need to make adjustments to the location and size manually after you've added the control.
Not a great answer for sure, but if you're stuck and just need to get work done for now until you have more time to figure it out, it should help.
Update: this answer works with both ,Visual Sudio 2017 and 2019
For me it worked by the following three steps:
Adding Report viewer control by:
Going to NuGet Package Manager.
Installing Microsoft.ReportingServices.ReportViewerControl.Winforms
For WebForms applications:
Adding Report viewer control by:
Going to NuGet Package Manager.
Installing Microsoft.ReportingServices.ReportViewerControl.WebForms
That's all!
Source: Stackoverflow.com