62,268
社区成员
发帖
与我相关
我的任务
分享
string str_select = string.Format("");
string str = Server.MapPath("StockCard.rpt");//rpt文件名字
StockCard ds1 = new StockCard();//数据源xsd
OdbcDataAdapter da1 = new OdbcDataAdapter(str_select, conn);
conn.Close();
ReportDocument rpt = new ReportDocument();
rpt.Load(str);
da1.Fill(ds1, "table");
rpt.SetDataSource(ds1.Tables["table"]);
this.StockCardView.ReportSource = rpt;