最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
水晶报表中子报表的数据绑定问题
时间:2022-07-02 11:31:27 编辑:袖梨 来源:一聚教程网
是否被水晶报表中子报表的数据绑定问题折磨过?这也是我另一文章所说的问题
http://www.cnblogs.com/haozidong/archive/2004/10/20/54489.html
你可以通过单独用代码绑定子报表来解决这个问题。
string sConnectionString = ConfigurationSettings.AppSettings["dbCommISMS"];
SqlConnection sqlConn = new SqlConnection(sConnectionString);
SqlCommand sqlComm = new SqlCommand();
SqlDataAdapter dataAdapter = new SqlDataAdapter();
sqlConn.Open();
sqlComm.Connection = sqlConn;
sqlComm.CommandType = CommandType.Text;
dataAdapter.SelectCommand = sqlComm;
Dataset1 dataSet = new Dataset1();
string sSQL = "SELECT * FROM T_REQUEST WHERE APPLI_ID = '" + appli_id + "'";
sqlComm.CommandText = sSQL;
dataAdapter.Fill(dataSet, "T_REQUEST");
sSQL = "SELECT * FROM T_REQUEST_INSPECTION WHERE APPLI_ID = '" + appli_id + "'";
sqlComm.CommandText = sSQL;
dataAdapter.Fill(dataSet, "T_REQUEST_INSPECTION");
sSQL = "SELECT * FROM T_ACCEPT_INSPECTION WHERE APPLI_ID = '" + appli_id + "'";
sqlComm.CommandText = sSQL;
dataAdapter.Fill(dataSet, "T_ACCEPT_INSPECTION");
SubreportObject oSubreport1 = oRpt.ReportFooterSection1.ReportObjects["Subreport1"] as SubreportObject;
ReportDocument oSub1 = oSubreport1.OpenSubreport("Inspection");
oSub1.SetDataSource(dataSet);
SubreportObject oSubreport2 = oRpt.ReportFooterSection2.ReportObjects["Subreport2"] as SubreportObject;
http://www.cnblogs.com/haozidong/archive/2004/10/20/54489.html
你可以通过单独用代码绑定子报表来解决这个问题。
string sConnectionString = ConfigurationSettings.AppSettings["dbCommISMS"];
SqlConnection sqlConn = new SqlConnection(sConnectionString);
SqlCommand sqlComm = new SqlCommand();
SqlDataAdapter dataAdapter = new SqlDataAdapter();
sqlConn.Open();
sqlComm.Connection = sqlConn;
sqlComm.CommandType = CommandType.Text;
dataAdapter.SelectCommand = sqlComm;
Dataset1 dataSet = new Dataset1();
string sSQL = "SELECT * FROM T_REQUEST WHERE APPLI_ID = '" + appli_id + "'";
sqlComm.CommandText = sSQL;
dataAdapter.Fill(dataSet, "T_REQUEST");
sSQL = "SELECT * FROM T_REQUEST_INSPECTION WHERE APPLI_ID = '" + appli_id + "'";
sqlComm.CommandText = sSQL;
dataAdapter.Fill(dataSet, "T_REQUEST_INSPECTION");
sSQL = "SELECT * FROM T_ACCEPT_INSPECTION WHERE APPLI_ID = '" + appli_id + "'";
sqlComm.CommandText = sSQL;
dataAdapter.Fill(dataSet, "T_ACCEPT_INSPECTION");
SubreportObject oSubreport1 = oRpt.ReportFooterSection1.ReportObjects["Subreport1"] as SubreportObject;
ReportDocument oSub1 = oSubreport1.OpenSubreport("Inspection");
oSub1.SetDataSource(dataSet);
SubreportObject oSubreport2 = oRpt.ReportFooterSection2.ReportObjects["Subreport2"] as SubreportObject;
相关文章
- 《彩色点点战争》推图常用三大主c玩法详解 01-23
- 《燕云十六声》池鱼林木任务攻略 01-23
- 《大连地铁e出行》查看行程记录方法 01-23
- 《明日方舟》2025春节限定干员余角色介绍 01-23
- 《崩坏:星穹铁道》万敌光锥搭配攻略 01-23
- 《燕云十六声》一药千金任务攻略 01-23