sqldataadapter cmd1 = new sqldataadapter(strs,cnn);
//create and fill the dataset.
dataset2 ds = new dataset2();
cmd1.fill(ds,"meeting");
// sqldataadapter cmd2 = new sqldataadapter("select * from realplan where rplanid in (select top 10000 planid from ("+sqlstr+")as a order by planid)", cnn);
sqldataadapter cmd2 = new sqldataadapter(sqlisoper, cnn);
cmd2.fill(ds,"realplan");
//create the relation between the authors and titles tables.
ds.relations.add("mo",
ds.tables["meeting"].columns["planid"],
ds.tables["realplan"].columns["rplanid"]);
//binding reportviewer
ocr.setdatasource(ds);
this.crystalreportviewer1.reportsource = ocr;
//close the connection.
cnn.close();
}
新闻热点
疑难解答
图片精选