求救,用PUSH模式的时候总是说登录失败,我补丁也打了,权限也设了,怎么回事?

zn1314 2004-07-16 02:15:33
用PUSH模式的时候总是说登录失败,我补丁也打了,权限也设了,怎么回事?求救
...全文
158 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
liulif 2005-03-11
  • 打赏
  • 举报
回复
看来是楼上用的PUSH类型
如果要看详细的
http://www.yesky.com/20020618/1616438.shtml
http://blog.csdn.net/haibodotnet/archive/2003/11/09/21506.aspx
cyh19820115 2005-03-11
  • 打赏
  • 举报
回复
private void Page_Load(object sender, System.EventArgs e)
{
this.DataBind();
bind();


//关键是这里,如果上面调用顺序不对,就出现,上面的问题.


}
private void bind()
{
string strProvider = "Server=(local);DataBase=NSwage;UID=sa;PWD=";
CrystalReport2 oCR = new CrystalReport2();

   Dataset1 ds = new Dataset1();

   SqlConnection MyConn = new SqlConnection(strProvider);

   MyConn.Open();

   string strSel = "Select * from persons";

   SqlDataAdapter MyAdapter = new SqlDataAdapter(strSel,MyConn);

   MyAdapter.Fill(ds,"persons");

   oCR.SetDataSource(ds);

   this.CrystalReportViewer1.ReportSource = oCR;
}
cyh19820115 2005-03-11
  • 打赏
  • 举报
回复
up,遇到同样的问题.

http://www.yesky.com/20020618/1616438.shtml

就是按照这个一步一步来到,还是错误.
wkevin27 2004-07-26
  • 打赏
  • 举报
回复
还是用数据集比较保险:
我喜欢这样的步骤:
建视图——建存储过程——建数据集(可以使用view或sp)——建rpt(使用数据集);

绑定时步骤:
自己建立数据库连接——从存储过程读数据加载给数据集(注意:dataadapter.Fill(myDataSet,srcTableName)的源表名要是建数据集的视图名或存储过程名)——myRPT.SetDataSource(myDataSet);——绑定到crviewer上。

这样我也不明白是pull还是push方式 :)
反正没有logon的问题。
AntingZ 2004-07-16
  • 打赏
  • 举报
回复
try:

'Objects used to set the proper database connection information
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo

'Set the connection information for all the tables used in the report
' Leave UserID and Password blank for trusted connection
For Each tbCurrent In rptAllCustomersOrders.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = ServerName
.UserID = "sa"
.Password = ""
.DatabaseName = "Northwind"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent

4,816

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧