本文介绍了系统运行时InteropServices问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在加载晶体报告时,此错误即将到来.错误是什么以及如何纠正.我的应用程序位于远程站点,我已将所有报告放在根文件夹中.
At the time of load the crystal report this error is coming. What is the error and how to rectify it.My Application is in remote site and I have put all the report inside root folder.
ReportDocument boReportDocument = new ReportDocument();
boReportDocument.Load(Server.MapPath("RptAccountReceipt.rpt"));
我已经这样加载报告了.
请帮帮我.
谢谢.
编辑-[在此处移动了OP的评论.]
I have load the report like this.
Please Help Me.
Thanks.
Edit - [Moved OP''s comments here.]
Server Error in '/' Application. Invalid file name. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Invalid file name. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [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() +270 [CrystalReportsException: Load report failed.] CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +333 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +877 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +84 Crystal_Report_CommonReport.Show_Data() +5677 Crystal_Report_CommonReport.Page_Load(Object sender, EventArgs e) +24 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) +91 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
加载报告时显示此错误页面.
This error page is showing at the time of loading the report.
推荐答案
这篇关于系统运行时InteropServices问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!