[問題]Crystal Reports 開啟報表登入

看板Database (資料庫)作者 (Hirayama...............)時間17年前 (2007/03/29 18:47), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我用VS.net 2003 環境 crystal reports 做了一個報表, 資料庫是Oracle 做完之後,發現一個小問題,就是每次開啟報表都要登入一次, 類似下圖: http://img134.imageshack.us/img134/6779/111na4.png
請問有經驗的大大們,有什麼辦法可以直接執行,不用打登入的帳號密碼。 先說感恩m(_ _)m --附上Code----- protected CrystalDecisions.Web.CrystalReportViewer CrystalReportViewer1; protected ReportDocument crReport = null; protected TableLogOnInfo crLogOnInfo = null; private void Page_Load(object sender, System.EventArgs e) { if (!(this.IsPostBack)) { ReportDocument crReport = new ReportDocument(); crReport.Load(Server.MapPath("SUSPECT.rpt")); TableLogOnInfo crLogOnInfo = new TableLogOnInfo(); foreach ( CrystalDecisions.CrystalReports.Engine.Table crTable in crReport\ .Database.Tables) { crLogOnInfo = crTable.LogOnInfo; crLogOnInfo.ConnectionInfo.ServerName= "ABC"; crLogOnInfo.ConnectionInfo.UserID = "User"; crLogOnInfo.ConnectionInfo.Password = "123"; crLogOnInfo.ConnectionInfo.DatabaseName = "DB"; crTable.ApplyLogOnInfo(crLogOnInfo); } CrystalReportViewer1.ReportSource = crReport; } } -- 當愛來時..我接受... 當恐龍來時...我不接受..... 當你來搶我女友時....我放手.. 當妳跟我說別離時....我不放手.. 在互相矛盾的生活中....... 我找尋一個最完美的平衡點............. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.125.82
文章代碼(AID): #162vbMV8 (Database)
文章代碼(AID): #162vbMV8 (Database)