我在..net2005 asp.net 下做的水晶报表,能显示但就是打不出来,页面刷新一下就没了,急死我了,帮忙呀
public void print()
{
OleDbConnection mycon = new OleDbConnection( "Provider=MSDAORA;Password=lj;User ID=lj;Data Source=lw ");
mycon.Open();
DataSet myDataset = new DataSet();
string time1 = WebDateChooser1.Value.ToString();
string[] time2 = time1.Split( ' ');
string time3 = time2[0];
string strse = "select distinct xh,rq,bz,zjh,cc,jch,dch1,dch2,gd,jcjl,tzry,zyrqj from main_lw where ( rq like to_date( ' " + time3 + " ', 'YYYY-MM-DD %:%:% ')) order by bz desc ";
// string strse1 = "select rq,zjh,cc,jch,dch1,dch2,zyrqj from main_lw_dd where ( rq like to_date( ' " + time3 + " ', 'YYYY-MM-DD %:%:% ')) ";
OleDbDataAdapter myAdapter1 = new OleDbDataAdapter(strse, mycon);
myAdapter1.Fill(myDataset, "main_lw ");
// OleDbDataAdapter myAdapter2 = new OleDbDataAdapter(strse1, mycon);
// myAdapter2.Fill(myDataset, "main_lw_dd ");
mycon.Close();
ReportDoc = new ReportDocument();
ReportDoc.Load(Server.MapPath( "lw_crt.rpt "));
ReportDoc.SetDataSource(myDataset);
CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.ActiveX;
CrystalReportViewer1.ReportSource = ReportDoc;
}
------解决方案--------------------顶。就不信没人会!
------解决方案--------------------