2017-04-08 112 views
1

我的Windows應用程序,我使用水晶報表正常工作在我的本地機器,但是當部署它,我得到這個錯誤無法打開連接的詳細信息:數據庫供應商代碼17]溫度21323asdasdfv-dfdsfc-dsfdsrxdfdf}。RPT詳細信息:[數據庫廠商代碼17] 這是我的代碼運行時加載報告如何解決錯誤數據庫供應商代碼17

string LogonInfo = CONN.GetDataBaseLogon(); //Get Connection string from XML file 
     string[] Log = LogonInfo.Split(','); 
     SqlConnection Con = new SqlConnection(CONN.GetSqlConnectionString()); 
     string Command = "USE MainDB; EXEC [dbo].[GetAllSalaf] ;"; 
     DataSet DS = new DataSet(); 
     SqlDataAdapter SAD = new SqlDataAdapter(Command, Con); 
     SAD.Fill(DS); 
     NewReports.Reports.AllSalaf S = new Reports.AllSalaf(); 
     S.SetDataSource(DS); 
     // Log[0] =User Id ,Log[1] password Log[2] Server name 
     S.SetDatabaseLogon(Log[0], Log[1], Log[2], "MainDB"); 
     crystalReportViewer1.ReportSource = S; 
     crystalReportViewer1.Refresh(); 

回答

2

檢查:

  1. Crystal報表運行時間。
  2. 如果報告中已存在你項目部署的PC或服務器?
+0

安裝CR運行32位.. –

相關問題