111,111
社区成员




DataTable dt = new DataTable();
string[] head = new string[] { "序号","姓名","性别","职称","月薪","电话"};
for (int i = 0; i < i < head.Length;i++ ) {
dt.Columns.Add(head[i],System.Type.GetType("System.String"));
}
for (int i = 0; i < 10;i++ ) {
dt.Rows.Add((i + 1).ToString(), "小白", "男", "程序员", "5000", "88888888");
}
ReportDocument doc = new ReportDocument();
doc.Load(@"E:\work_space\DongTest\CrystalReport1.rpt");
doc.SetDataSource(dt);
crystalReportViewer1.ReportSource = doc;
crystalReportViewer1.RefreshReport();