我的錯誤就像無效的報告文件雖然Crystal報告正在加載文件....報告文件路徑無效。在水晶報告中雖然
OrderWindow objRpt; objRpt = new OrderWindow(); 嘗試 string str = ConfigurationManager.ConnectionStrings [「ConnData」]。ConnectionString.ToString(); SqlConnection con = new SqlConnection(str); OrderDelivery Od = new OrderDelivery(); Od.Activate(); DataSet ds = Od.GetProductDetails(); objRpt.SetDataSource(ds);
ReportDocument rd = new ReportDocument();
ConnectionInfo info = new ConnectionInfo();
info.DatabaseName = "BillingAndAccounts";
info.UserID = "sa";
info.Password = "sai123";
SetDBLogonForReport(info, rd);
rd.Refresh();//Here am Getting Error...
rd.VerifyDatabase();
crystalReportViewer1.ReportSource = objRpt;