600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > asp.net中使用水晶报表 ---pull

asp.net中使用水晶报表 ---pull

时间:2022-09-18 02:08:32

相关推荐

asp.net中使用水晶报表 ---pull

创建这个的过程和使用向导的一样

然后编写后台代码

private void Show(){pd = new ReportDocument();pd.Load(Server.MapPath("~/Report/scend_report.rpt"));ConnectionInfo cinFo = new ConnectionInfo();cinFo.UserID = "sa";cinFo.Password = "12345";cinFo.DatabaseName = "Demo";Tables tbles = pd.Database.Tables;foreach (CrystalDecisions.CrystalReports.Engine.Table tb in tbles){TableLogOnInfo ton = tb.LogOnInfo;ton.ConnectionInfo = cinFo;tb.ApplyLogOnInfo(ton);}CrystalReportViewer1.ReportSource = pd;}

然后就可以在浏览器中查看了

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。