水晶报表登录失败(已经设置了sa 与passwaord)。高手帮忙! 在web form上添加一个OleDbConnection,连接到数据库时让.NET自动生成一个连接字符串,试试看能不能连上 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Me.CrystalReportViewer1.ReportSource = Server.MapPath("report/scjh_pc_query.rpt") Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.UserID = "sa" Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.Password = "" Me.CrystalReportViewer1.BestFitPage = True Me.CrystalReportViewer1.DataBind()用程序指定用户和密码 谢谢两位。我用开始就是用web form上添加一个OleDbConnection,连接到数据库时让.NET自动生成一个连接字符串,但不知是什么原因,显示登录失败。可能是版本或命名空间的原因 我的CrystalReportViewer1.LogOnInfo后不能写Item(0)项.不过我的问题解决了!是参考以前的帖子写的: ReportDocument Report = new ReportDocument(); Report.Load(Server.MapPath("\\report\\CrystalReport1.rpt")); TableLogOnInfo logOnInfo = new TableLogOnInfo(); //对报表中的每个表进行循环 for(int i=0;i==Report.Database.Tables.Count-1;i++) { logOnInfo.ConnectionInfo.UserID = "sa"; logOnInfo.ConnectionInfo.Password = "password"; Report.Database.Tables[i].ApplyLogOnInfo(logOnInfo); } CrystalReportViewer1.ReportSource = Report; CrystalReportViewer1.BestFitPage = true; CrystalReportViewer1.DataBind(); 如何扩展asp.net中的类? Ajax无刷新控件 关于页面传值的问题 gridview,的button 请大家帮忙分析一个多线程的问题 datalist排版问题 asp.net查询access的问题 非常的奇怪了 各位帮忙了 文本框自己显示数据 求教,ASP中的SESSION变量如何放放.NET中 如何选定框架的哪个框 2个简单问题???也许你也不知道. asp中vote=split(vote,chr(13)&chr(10))转asp.net如何写啊
Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.UserID = "sa"
Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.Password = ""
Me.CrystalReportViewer1.BestFitPage = True
Me.CrystalReportViewer1.DataBind()用程序指定用户和密码
我用开始就是用web form上添加一个OleDbConnection,连接到数据库时让.NET自动生成一个连接字符串,但不知是什么原因,显示登录失败。可能是版本或命名空间的原因
我的CrystalReportViewer1.LogOnInfo后不能写Item(0)项.不过我的问题解决了!是参考以前的帖子写的:
ReportDocument Report = new ReportDocument();
Report.Load(Server.MapPath("\\report\\CrystalReport1.rpt"));
TableLogOnInfo logOnInfo = new TableLogOnInfo(); //对报表中的每个表进行循环
for(int i=0;i==Report.Database.Tables.Count-1;i++)
{
logOnInfo.ConnectionInfo.UserID = "sa";
logOnInfo.ConnectionInfo.Password = "password";
Report.Database.Tables[i].ApplyLogOnInfo(logOnInfo);
}
CrystalReportViewer1.ReportSource = Report;
CrystalReportViewer1.BestFitPage = true;
CrystalReportViewer1.DataBind();