友.rdlc報告,我已經開發使用C#一個簡單的應用程序,它有兩個RDLC報告如何綁定數據源在C#
我用下面這段代碼綁定的數據源的報表查看器
this.reportViewer1.LocalReport.ReportPath = @"C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\reports\reports\Report1.rdlc";
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("customer", dt.Tables[0])) ;
this.reportViewer1.RefreshReport();
但是當報告生成時,它是空的報告沒有數據會顯示,任何意見???
ASP.net或WinForm的? – Damith 2013-04-09 06:10:22
@ Damith - Winforms – Roshan 2013-04-09 06:12:51
'dt.Tables [0]'是否真的包含數據?另外:您的報告中的數據源是「客戶」嗎? – 2013-04-09 06:13:52