Search code examples
c#crystal-reportsvisual-studio-2015reportingmissing-template

Reporting template not available in Visual Studio 2015 C#


I want to create a .rdlc file in a WPF project but adding add new dialog box doesn't provides any option to create a new report. I have installed Microsoft SQL server data tools, express localdb and prerequisites for ssdt. Can anyone point me in the direction why this option is not available.

Note: When I installed VS 2015 some of the features were not properly installed, well I installed some of those packages which I required from time to time. Now there are still a couple of packages missing. One is Microsoft report viewer add-on for visual studio 2015. I searched for this add-on on the internet but I wasn't able to locate it. I also installed report viewer runtime as I was missing assembly dll(s) for adding reference to Microsoft.ReportViewer.WinForms.

I have attached some screenshots for reference.

vs-error-log

installed-packages

p.s. if you think that this is a possible duplicate, well I tried a couple of answers already on stack overflow which didn't worked in my case. That's why I am posting a separate question.


Solution

  • I had this problem and solved it by the following:

    1. Get the nugget package for the Microsoft Report Viewer 2015
      a. Right click the project and choose Manage NuGet Packages
      b. Click on the browse tab
      c. The package used was Microsoft.Reportviewer.2015 by AdrienGuillerot v12.0.2.2402
    2. Add the report viewer to your toolbox.
      a. Right Click, then Choose Items...
      b. Browse to the dlls in the package.
    3. Put the control in your webform.
      a. Drag the control from your toolbox onto the form.
      b. Set the Dock property to fill.
      c. Add the following code to YourForm.Designer.cs in the InitializeComponent() method.

      this.Controls.Add(reportViewer1);