我要疯了,水晶报表总是出现登录框?
版本是Crystal Report9.2.0.448,在我的机器上不会出现登录框,可是安装到客户的机器上就出现数据库登录框,然后输入用户名和密码后,提示登录失败!已经弄了好几天了,也没有解决。客户机上有.Net FrameWork1.1,Crystal Report9.2.0.448,大家知道是什么原因吗?我实在是弄不出来了,谢谢了先!
------解决方案--------------------没用过,帮顶
------解决方案--------------------你怎么传数据库连接的
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)
最新版本:20070127
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
------解决方案--------------------using CrystalDecisions.Shared ; //负责解释TableLogOnInfo类
using CrystalDecisions.CrystalReports.Engine ; //负责解释ReportDocument类
private void Page_Load(object sender, System.EventArgs e)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();
//这里必须事先申明一个ReportDocument对象 Report,同时加载数据报表
ReportDocument oRpt = new ReportDocument();
//获取.rpt文件真实路径
string path;
path=Server.MapPath ( "cr.rpt ");
oRpt.Load (path);
//从web.config中获取logOnInfo参数信息
string a,b,c,d;
//获取ServerName
a=System.Configuration.ConfigurationSettings.AppSettings [ "servername "];
//获取DatabaseName
b=System.Configuration.ConfigurationSettings.AppSettings [ "database "];
//获取UserId
c=System.Configuration.ConfigurationSettings.AppSettings [ "userid "];
//获取password
d=System.Configuration.ConfigurationSettings.AppSettings [ "pass "];
//设置logOnInfo参数
logOnInfo.ConnectionInfo.ServerName = a;
logOnInfo.ConnectionInfo.DatabaseName = b;
logOnInfo.ConnectionInfo.UserID = c;
logOnInfo.ConnectionInfo.Password = d;
oRpt.Database.Tables [0].ApplyLogOnInfo (logOnInfo);
//建立.rpt文件与CryStalReportviewer文件之间的连接
CrystalReportViewer1.ReportSource = oRpt;
DataBind();
}
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
------解决方案--------------------using CrystalDecisions.Shared ; //负责解释TableLogOnInfo类
using CrystalDecisions.CrystalReports.Engine ; //负责解释ReportDocument类
private void Page_Load(object sender, System.EventArgs e)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();
//这里必须事先申明一个ReportDocument对象 Report,同时加载数据报表
ReportDocument oRpt = new ReportDocument();
//获取.rpt文件真实路径
string path;
path=Server.MapPath ( "cr.rpt ");
oRpt.Load (path);
//从web.config中获取logOnInfo参数信息
string a,b,c,d;
//获取ServerName
a=System.Configuration.ConfigurationSettings.AppSettings [ "servername "];
//获取DatabaseName
b=System.Configuration.ConfigurationSettings.AppSettings [ "database "];
//获取UserId
c=System.Configuration.ConfigurationSettings.AppSettings [ "userid "];
//获取password
d=System.Configuration.ConfigurationSettings.AppSettings [ "pass "];
//设置logOnInfo参数
logOnInfo.ConnectionInfo.ServerName = a;
logOnInfo.ConnectionInfo.DatabaseName = b;
logOnInfo.ConnectionInfo.UserID = c;
logOnInfo.ConnectionInfo.Password = d;
oRpt.Database.Tables [0].ApplyLogOnInfo (logOnInfo);
//建立.rpt文件与CryStalReportviewer文件之间的连接
CrystalReportViewer1.ReportSource = oRpt;
DataBind();
}
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)