简体   繁体   中英

reportviewer not shown on form designer (c# winform)

I user reportviewer for my winform app!!!

now when i select reportviewer control from toolbox and add that to page controler, any thing not shown on form designer, but bottom of page the name of reportviewer will be seen!!!

i really confused for this problem !!!

this problem appeared when i make backup from my project... and before that i did't have any problem with report viewer! (i set location and size of reportviewer manually but ...)

 this.reportViewer1.Location = new System.Drawing.Point(0, 0);
 this.reportViewer1.Name = "ReportViewer";
 this.reportViewer1.Size = new System.Drawing.Size(396, 246);
 this.reportViewer1.TabIndex = 0;
 this.reportViewer1.Visible = true;

在此处输入图像描述

I found a workaround

this line Manual added this.Controls.Add(this.reportViewer1);

on method InitializeComponent

Why when Drag-drop control on the Windows Forms

Not added automatic

Ps Sorry for my english

我和你有同样的问题,我通过使用 Nuget 将 dll Windows.ReportViewer.Winform (版本 10.0)更新到(版本 11.0)来解决它。

For those that didn't have the ReportViewer control in the Toolbox so they followed the instructions and added the control manually -- if you don't see the ReportViewer control after dragging the (now available) ReportViewer control, then right click on References in your project structure, then browse to the exact same location from where you took the ....WinForm.dll or WebForm.dll and this time choose ...Designer.dll .

Rebuild your project and try dragging again. This time the control should be visible on the form.

install version 11.0.3452. It's working for me. enter image description here .

How I solved the same issue. Deleted the reference Windows.ReportViewer.Winform and Microsoft.ReportViewer.Common and dragged report viewer control on the form and added this line this.Controls.Add(this.reportViewer1); in private void InitializeComponent()

Install the nuget package:- Microsoft.ReportingServices.ReportViewerControl.Winforms

It will solve the issue

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