我有Windows应用程序,我使用水晶报告它在我的本地机器上正常工作,但部署时我得到此错误无法打开连接详细信息:[数据库供应商代码17] temp 21323asdasdfv-dfdsfc-dsfdsrxdfdf} .rpt详细信息:[数据库供应商代码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();
答案 0 :(得分:2)
检查: