最新下载
热门教程
- 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;
相关文章
- 《1号会员店》关闭自动续费方法 01-29
- 《排球少年:新的征程》社团每日福利领取方法 01-29
- 《椿之歌》新手风属性队伍推荐 01-29
- 《最终幻想14:水晶世界》小小阿托莫斯宠物获得方法 01-29
- 《燕云十六声》醉拳客打法攻略 01-29
- 《异人之下》全货币获取方法汇总 01-29