cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Database Login window.

Former Member
0 Kudos

Hi,

i have a windows application in .net 2005 upgraded to .net 2012. the old version is running fine on a Win2003 Server. database is 2005 express on Win2003 Server.

i have upgraded this application to vs2012. On my machine (Win7 - SQL Express 2005) the application is running fine with .net 2012.

But on A Win2016 Server (the new engine for crystal report has been installed), all crystal reports display db login window and db name cant be seen although it has been provided. i have installed express 2012 on win2016 server for driver.

i'm using the following for conn settings :

 MyReport reportDelivery = new MyReport ();
   reportDelivery.DataSourceConnections[0].SetConnection(Globals.DB_Loc,Globals.DBName.ToUpper() , Globals.ReadUser_Name, Globals.ReadPassWord);

   reportDelivery.Refresh();      
   reportDelivery.RecordSelectionFormula = ReportCondition;

//ReportCondition is a string that has a value for //filtering records

   Viewer.ReportSource = reportDelivery;

all above code is running fine with old version on any machines.
i have also tried :

private void SetReportConnection(CrystalDecisions.CrystalReports.Engine.ReportClass report)
       {
           ConnectionInfo connInfo = new ConnectionInfo();
           connInfo.ServerName = Globals.DB_Loc;
           connInfo.DatabaseName = Globals.DBName;
           connInfo.UserID = Globals.ReadUser_Name;
           connInfo.Password = Globals.ReadPassWord;

           Tables crTables; Database crDatabase; TableLogOnInfo crTableLogonInfo;

           TableLogOnInfo tableLogOnInfo = new TableLogOnInfo();
           tableLogOnInfo.ConnectionInfo = connInfo;

           crDatabase = report.Database; crTables = crDatabase.Tables;

           foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
           {
               crTableLogonInfo = crTable.LogOnInfo;
               crTableLogonInfo.ConnectionInfo = connInfo;
               crTable.ApplyLogOnInfo(crTableLogonInfo);
           }
       }

but useless. all i'm getting when requesting a report is database login window with no value for database name. i think it's a matter of settings i have to change.

any idea ?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

MS SQL Server 2005 is no longer supported by MS so time to upgrade it also.

Try using the MS SQL Native 11 client engine and see if that helps.

Don

Answers (0)