I know this question has been asked many times but none of those has solved my problem. I am new in windows application. I am showing some records in Crystal reports. Here is my code...
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();
It's working fine. But when I installed it to another computer it does not work and shows the following error...
Load Report Failed. A document processed by the JRC engine cannot be opened in the C++ stack
I can understand, this error occurred when application does not find the desired report. But what is wrong with my code. Please help guys...