简体   繁体   中英

Report viewer in Visual Studio 2015 C#

I am trying to add a Microsoft Report Viewer to my project, I am using Visual Studio 2015 and also installed Microsoft Report Viewer 2015 Runtime. My first problem was that I had no ReportViewer in toolbar, but I fixed it by searching it through the list (.NET list), then when I tried to add it on my form, it didn't show up on my form, but it was added to the project (because it appeared at the bottom of the screen, just above output as ReportViewer1).

Is there any similar package I can use for reports instead of Microsoft? Or is there any fix for this?

ReportViewer version is 11.0.0.

  1. Get the nugget package (sounds like you did this)
  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 in control 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);

If it's not showing up on Toolbar, it probably wasn't picked during your main install.

This fixed it for me:

  1. Open Control Panel / Programs and Features / "Microsoft Visual Studio 2015"

  2. Pick "Change"

  3. Wait for splash screen. Press the "Modify" button.

  4. Select "Windows and Web Development" Group

  5. Check "Microsoft SQL Server Data Tools"

  6. Click "Update"

After a bit of time configuring itself you should see "Setup Completed!"

Reload VS, pick the form and it should be on toolbar under Reports group near bottom.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM