高分求解,WINFORM水晶报表问题
flers 2004-03-15 03:02:56 private void frm_bjd_Load(object sender, System.EventArgs e)
{
strconn myconn=new strconn();
SqlConnection sqlconn=new SqlConnection("data source=FLERS;initial catalog=xtdatabaset;persist security info=False;user id=sa;workstation id=FLERS;packet size=4096");
myconn.sqlconn.Open();
SqlDataAdapter myadapter;
xtbjd bjdrpt=new xtbjd();
sqlconn.Open();
myadapter=new SqlDataAdapter("select * from products where id<20",sqlconn);
DataSet rptds=new DataSet();
myadapter.Fill(rptds);
bjdrpt.SetDataSource(rptds.Tables[0].DefaultView);
this.crystalReportViewer1.ReportSource=bjdrpt;
sqlconn.Close();
}
private void frm_bjd_SizeChanged(object sender, System.EventArgs e)
{
this.crystalReportViewer1.Width=this.Width;
this.crystalReportViewer1.Height=this.Height;
}
问题:我select * from products where id<20没作用?一打开FORM时把整张表的内容分成123页,数据全部显示出来了,并不能执行达到我所要的结果呢?试了N次,重做了N次.RPT文件,用的是WIN2003+VS.net2003+自带的水晶报表。