我上傳了我的WebApplication。我的應用程序在VS2008中使用Crystal Reports 2008 sp3。 我上傳了並行叢服務器。我在Bin文件夾中添加了所有必需的水晶報告Dll。我的報告路徑也是正確的。Crystal Report「文件名無效」。問題
我收到的錯誤是
Line 41: ReportDocument myreport = new ReportDocument();
Line 42: string reportPath = Server.MapPath("~/CrystalReport.rpt");
Line 43: myreport.Load(reportPath);
Line 44:
Line 45: myreport.SetDataSource(ds);
[COMException (0x800001fb): Invalid file name.]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +95
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +356
[CrystalReportsException: Load report failed.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +418
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +895
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +84
_Default.CreateReport() in d:\inetpub\vhosts\mydomain.in\subdomains\mysubdomain\httpdocs\Default.aspx.cs:43
_Default.Page_Load(Object sender, EventArgs e) in d:\inetpub\vhosts\mydomain.in\subdomains\mysubdomain\httpdocs\Default.aspx.cs:21
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
我無法獲取錯誤所在。該報告是平躺在根文件夾本身。那麼這是什麼問題。還有另一個文件夾aspnet_client。我們需要做什麼?
請等待回覆
您是否因爲此特定報告或所有報告而出現此錯誤? – Deb 2012-04-23 16:02:47
所有報告..我想有一些問題與許可..但我不能弄明白。它在我的IIS上工作正常 – Moiz 2012-04-23 16:08:39
確保您的報表服務器(網絡服務)在C:\ Windows \ Temp \文件夾上具有讀寫權限。 – Deb 2012-04-23 16:23:01