我知道这个问题已被多次询问,但这些问题都没有解决我的问题。我是Windows应用程序的新手。我在Crystal报告中显示了一些记录。这是我的代码......
ReportDocument rptDoc = new ReportDocument();
ds = new InstallationReport();
ds = PrintInstallationReport();
ds.Tables[0].Merge(ds.Tables[0]);
//string AppPath = Environment.CurrentDirectory + "\\Reports\\InstallationReport.rpt";
//rptDoc.Load(AppPath);
//rptDoc.Load(@"F:\vs10\Windows\RapidDiagnostic\RapidDiagnostic\Reports\InstallationReport.rpt");
rptDoc.Load(Application.StartupPath + "\\Reports\\InstallationReport.rpt");
rptDoc.SetDataSource(ds.Tables[0]);
crystalReportViewer1.ReportSource = rptDoc;
crystalReportViewer1.Refresh();
工作正常。但是,当我将它安装到另一台计算机时,它不起作用,并显示以下错误...
Load Report Failed. A document processed by the JRC engine cannot be opened in the C++ stack
我可以理解,当应用程序找不到所需的报告时,会发生此错误。但是我的代码出了什么问题。请帮帮我们......