我創建了一個帶有功能導出報告的應用程序作爲pdf文件,應用程序可以以網絡格式下載報告。 我在我的電腦上運行的應用程序,這是工作,但我會在用戶的PC上運行,但未能出口報告導出無法在用戶的電腦上工作
Using _report
_report.Load(HttpContext.Current.Server.MapPath("Report/" & "report.rpt"))
_reportname = name & date.now
_report.ParameterFields("name").CurrentValues.Clear()
_report.ParameterFields("name").CurrentValues.AddValue(_name)
_report.SetDatabaseLogon(_gstrID, _gstrPassword, _gstrDataSource, _gstrCatalog)
_report.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, context.Response, True, _reportname)
_report.Export()
_report.Database.Dispose()
_report.Dispose()
任何小姐走在我的代碼的時候???
你是什麼意思「導出失敗」?是否有錯誤訊息?什麼是失敗? – NotMe
該報告可以在我的電腦中輸出爲pdf,但不能在用戶電腦中輸出。我使用try&catch來檢查錯誤,但沒有錯誤消息彈出。當我在我的電腦上運行時,會彈出一個pdf下載消息,但在用戶電腦中,沒有任何彈出 – sozai
您確定它沒有下載?你可以配置一些瀏覽器來*不顯示下載對話框。哪個瀏覽器(包括版本)是這個失敗? – NotMe