通常,当我在窗体中添加ReportViewer时,它会显示Reportviewer工具栏和所有内容,但现在,当我尝试在现有程序中执行此操作时,它不会显示。它只给我留下一个黑色的表单。我试着用编程的方式来做,但是没有那个工具栏我就不能工作!:p (愚蠢的我)
有什么想法我可以尝试,或者是什么导致了这一点?
这只是一个简单的报告,其中应该显示3个字符串,我将它们作为参数添加如下:
ReportParameter p1 = new ReportParameter("NAME", Name_value);
ReportParameter p2 = new ReportParameter("EMPLOYEE_ID", EmployeeId_value);
ReportParameter p3 = new ReportParameter("COMPANY", Company_value);
reportViewer3.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
reportViewer3.LocalReport.ReportEmbeddedResource = "Report1.rdlc";
reportViewer3.LocalReport.ReportPath = @"C:\Users\MGRU\Desktop\projects\EmpKeyCard\EmpKeyCard\EmpKeyCard\Report1.rdlc";
reportViewer3.LocalReport.SetParameters(new ReportParameter[] { p1, p2, p3 });
reportViewer3.ShowParameterPrompts = true;
reportViewer3.RefreshReport();发布于 2016-01-28 10:05:05
This.reportViewer1.Refresh();
让报告显示出来是很重要的。获得空白页的罪魁祸首可能是这样的。
发布于 2017-07-18 19:58:42
通过此链接https://www.microsoft.com/en-us/download/confirmation.aspx?id=35747下载并安装MICROSOFT®REPORT VIEWER 2012运行时,这解决了我同样的问题。
https://stackoverflow.com/questions/25744006
复制相似问题