回复 11楼xfeng1982的帖子
xfeng1982 你好,
请尝试一下代码:
- public void InitARData()
- {
- SqlConnection conn = new SqlConnection(strCon);
- conn.Open();
- SqlDataAdapter ad = new SqlDataAdapter("select * from SMSSend", conn);
- DataSet myset = new DataSet();
- ad.Fill(myset, "SMSSend");
- DemoAReport rpt = new DemoAReport();
- rpt.DataSource = myset;
- rpt.DataMember = myset.Tables[0].TableName;
- WebViewer1.Report = rpt;
- rpt.Run();
- conn.Close();
- }
复制代码
需要提醒的是:
需要在 AR 模板中指定 TextBox 的 DataField 。 |