Crystal Report“Logon Failed”在ADO.NET数据集上 [英] Crystal Report "Logon Failed" on ADO.NET dataset

查看:63
本文介绍了Crystal Report“Logon Failed”在ADO.NET数据集上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在使用....

.Net Runtime 1.1
CR 9附带vs2003
Winforms Application
DataSource = ADO.NET数据集

我在一年前完成了这个应用程序,我们有70多个客户。
我们的一个客户在6台计算机上安装了我们的程序。在几天之前,包括水晶报告在内的程序运行正常。
突然,在上个月,CR查看器开始弹出错误"Logon Failed",其中包含带有预先写好的表名的登录框。

我有在每个讨论板上检查了数据集的所有登录问题。
我发现 - 表名或字段名可能是错误的。

任何人都可以想到可能导致CR显示的任何程序或条件"登录"特别是在经历了一年的好运之后失败了吗?

BTW,所有的客户端机器都是带有SP2的Windows XP。

Kapil

解决方案

如果您的服务器名称/数据库名称与您在设计中选择的名称/数据库名称不同,则可能会出现此问题时间


解决此问题


公开 共享 Sub Sub_CRCrystalLogon( ByRef rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)


''CrystalReport1'必须是CrystalReport的名称


Dim crTableLogOnInfo As TableLogOnInfo = TableLogOnInfo


Dim crConnectionInfo As ConnectionInfo = New ConnectionInfo


'Crystal Report Properties


Dim crDatabase As CrystalDecisions.CrystalReports.Engine.Database


Dim crTables As CrystalDecisions.CrystalReports.Engine.Tables


Dim crTable As CrystalDecisions.CrystalReports .Engine.Table


'然后,使用以下代码示例在t中添加逻辑他的Web窗体的Page_Load方法:


crConnectionInfo.ServerName = 服务器名称


crConnectionInfo.DatabaseName = DataBaseName


crConnectionInfo.UserID = DBUserID


crConnectionInfo.Password = DBPassword


crDatabase = rpt。数据库


crTables = crDatabase.Tables


For < font size = 2> 每个 crTable In crTables


crTableLogOnInfo = crTable.LogOnInfo


crTableLogOnInfo.ConnectionInfo = crConnectionInfo


crTable.ApplyLogOnInfo(crTableLogOnInfo)


下一步


结束 Sub


对于以上所有代码,你必须写下面


Imports CrystalDecisions.Shared


Imports < font color ="#000000"> CrystalDecisions.CrystalReports.Engine


这可能有所帮助你


问候


Hello,

I am using....

.Net Runtime 1.1
CR 9 shipped with vs2003
Winforms Application
DataSource = ADO.NET dataset

I have finished this application a year ago and we have 70+ clients.
One of our clients has our program installed on 6 computers. Before few days, the program including crystal report was working fine.
Suddenly, in last month, CR viewer started popping up error "Logon Failed" with login box with prewritten table name in it.

I have checked all logon problems with dataset on every discussion board.
All I found was - table name or field name might be wrong.

Can anyone think of any program or condition that can cause CR to display "Logon Failed" specially after going well for a year?

BTW, All the client machines are windows XP with SP2 on it.

Kapil

解决方案

this problem may come if your Server Name / Database Name is different from what u have selected at design time

To solve this problem

Public Shared Sub Sub_CRCrystalLogon(ByRef rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)

''CrystalReport1' must be the name the CrystalReport

Dim crTableLogOnInfo As TableLogOnInfo = New TableLogOnInfo

Dim crConnectionInfo As ConnectionInfo = New ConnectionInfo

'Crystal Report Properties

Dim crDatabase As CrystalDecisions.CrystalReports.Engine.Database

Dim crTables As CrystalDecisions.CrystalReports.Engine.Tables

Dim crTable As CrystalDecisions.CrystalReports.Engine.Table

'Then, use following code sample to add the logic in the Page_Load method of your Web Form:

crConnectionInfo.ServerName = Server Name

crConnectionInfo.DatabaseName = DataBaseName

crConnectionInfo.UserID = DBUserID

crConnectionInfo.Password = DBPassword

crDatabase = rpt.Database

crTables = crDatabase.Tables

For Each crTable In crTables

crTableLogOnInfo = crTable.LogOnInfo

crTableLogOnInfo.ConnectionInfo = crConnectionInfo

crTable.ApplyLogOnInfo(crTableLogOnInfo)

Next

End Sub

for all above code u have to write following

Imports CrystalDecisions.Shared

Imports CrystalDecisions.CrystalReports.Engine

This may help u

Regards


这篇关于Crystal Report“Logon Failed”在ADO.NET数据集上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆