Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Connection to SQL Server Post Reply Post New Topic
Author Message
Vitaly
Newbie
Newbie


Joined: 05 Mar 2007
Online Status: Offline
Posts: 1
Quote Vitaly Replybullet Topic: Connection to SQL Server
    Posted: 05 Mar 2007 at 3:21am
I develope a web application under Win XP using C# (VS .NET 2003). The Crystal Report template data source is set OLE DB provider. I use MSDE 2000 (SP3). I make the application setup program using the Web Setup Project. The application work fine under Win XP, but the "logon failed" error arises under Win 2000 Proffesional and under Win 2000 Server. What is wrong?
 
Here is code:

ReportDocument crReport = new ReportDocument();string sTemplatePath = Server.MapPath(Request.ApplicationPath + "/" + m_sReportTemplate);

crReport.Load(@sTemplatePath);

TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();

ConnectionInfo tConnInfo = new ConnectionInfo();

tConnInfo.ServerName = "ServerName";

tConnInfo.DatabaseName = "DatabaseName";

tConnInfo.UserID = "UserId";

tConnInfo.Password = "Password";

foreach(CrystalDecisions.CrystalReports.Engine.Table crTable in crReport.Database.Tables)

{

crTableLogOnInfo = crTable.LogOnInfo;

crTableLogOnInfo.ConnectionInfo = tConnInfo;

crTable.ApplyLogOnInfo(crTableLogOnInfo);

}

CrystalReportViewer1.ReportSource = crReport;

CrystalReportViewer1.DataBind();

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 05 Mar 2007 at 10:49am

Is the SQL Server client installed on the Win2K machines?  Can they connect to the correct database through SQL Server tools that are not Crystal?  Is OleDB installed on those machines?

-Dell

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.023 seconds.