Skip to Content
0
Former Member
Jul 08, 2010 at 02:58 PM

Logon failed.Error in File XXX.rpt Unable to connect: incorrect log on para

357 Views

HI

I have had crystal reports running on our small business server 2003 server now for over 12 months with no problems, this is with creating crystal reports in visual studio testing them locally then deploying to the server - all fine.

The past week we upgraded the server from small business server 2003 to small business server 2008.

I use Sql server 2008 on both servers.

Now I get the error message:

Logon failed.Error in File temp_e54ff288-3e6b-436d-aa03-442e72399e02 {66B9B0F2-C6B4-4CCD-B21F-759CF546E68D}.rpt:

Unable to connect: incorrect log on parameters.

The database login parameters are held in the web.config file, I have changed these accordingly i.e (i have removed the actual details out)

<add key="CRServerName" value="server"></add>

<add key="CRDatabaseName" value="database"></add>

<add key="CRUserID" value="usename"></add>

<add key="CRPassword" value="password"></add>

The code remains unchanged for 2 years, that is:

#region Set Crystal Reports database

CrystalDecisions.Shared.ConnectionInfo conn = new CrystalDecisions.Shared.ConnectionInfo();

conn.ServerName = ConfigurationManager.AppSettings["CRServerName"].ToString();

conn.DatabaseName = ConfigurationManager.AppSettings["CRDatabaseName"].ToString();

conn.UserID = ConfigurationManager.AppSettings["CRUserID"].ToString();

conn.Password = ConfigurationManager.AppSettings["CRPassword"].ToString();

CrystalDecisions.CrystalReports.Engine.Tables tables = crptReport.Database.Tables;

CrystalDecisions.Shared.TableLogOnInfos tablelogininfos;

CrystalDecisions.Shared.TableLogOnInfo tablelogininfo;

foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)

{

tablelogininfo = table.LogOnInfo;

tablelogininfo.ConnectionInfo = conn;

table.ApplyLogOnInfo(tablelogininfo);

table.Location = conn.DatabaseName + ".dbo." + table.Location.Substring(table.Location.LastIndexOf(".") + 1);

#endregion

So the only difference is the server from 2003 small business server has been upgraded to 2008 small business server.

Does, has anyone had some experience here? I changed the web.config details to use the sa database password, no difference.

Is this a permissions thing? Our new server is called 'sql' would this make a difference (that is is a keyword in sql).

Any help is appreciated!

Best

Matt