登录Crystal Report中的失败错误 [英] Log in Failed Error in Crystal Report

查看:73
本文介绍了登录Crystal Report中的失败错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我使用带有C#和Crystal Report的Visual Studio 2008开发了一个Windows应用程序。



此应用程序 已开发  System-1 水晶报告 在 System-1中显示。< span class =code-keyword>然后将相同的项目 复制系统 - 2  运行时,发生以下错误 -   登录失败请再试一次 





如何解决这个问题????



以下是代码,



privatevoid SetDBLogonForReport(ConnectionInfo connectionInfo)

{



TableLogOnInfos tableLogOnInfos = crystalReportViewer1.LogOnInfo;

foreach(tableLogOnInfos中的TableLogOnInfo tableLogOnInfo)

{

tableLogOnInfo.ConnectionInfo = connectionInfo;

}

}



publicvoid ConfigureCrystalReports()

{

ConnectionInfo connectionInfo = newConnectionInfo();

connectionInfo.ServerName =localhost;

connectionInfo.DatabaseName = Application.StartupPath +\\Database \\Invoicebill.mdb;

connectionInfo.UserID =admin;

connectionInfo.Password =adminusam;

SetDBLogonForReport(connectionInfo);

}

解决方案

< blockquote>检查连接字符串并通过打开从system1到system2的水晶报告来更新连接,因为它只连接到system1


Hi,

I developed one windows application using Visual Studio 2008 with C# with Crystal Report.

This application is developed in System-1 and the crystal report is displaying in System-1.Then the same project is copied to System-2 and while running, the following error occurs -"Logon failed please try again"



How to solve this???

The following is the code,

privatevoid SetDBLogonForReport(ConnectionInfo connectionInfo)
{

TableLogOnInfos tableLogOnInfos = crystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
{
tableLogOnInfo.ConnectionInfo = connectionInfo;
}
}

publicvoid ConfigureCrystalReports()
{
ConnectionInfo connectionInfo = newConnectionInfo();
connectionInfo.ServerName = "localhost";
connectionInfo.DatabaseName = Application.StartupPath + "\\Database\\Invoicebill.mdb";
connectionInfo.UserID = "admin";
connectionInfo.Password = "adminusam";
SetDBLogonForReport(connectionInfo);
}

解决方案

Check the Connection string and update the connection by opening crystal report from system1 to system2 as its connecting to system1 only


这篇关于登录Crystal Report中的失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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