最新下载
热门教程
- 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;
相关文章
- 《无限暖暖》天星之羽获得位置介绍 12-20
- 《流放之路2》重铸台解锁方法介绍 12-20
- 《无限暖暖》瞄准那个亮亮的成就怎么做 12-20
- 《无限暖暖》魔气怪终结者完成方法 12-20
- 《无限暖暖》曙光毛团获得位置介绍 12-20
- 《无限暖暖》日光果获得位置介绍 12-20