Hello everyone,
I am developping a windows application using C# and a sql server data base. I have come to the last step of my developpement, where I have to include reports. So the problem in when I try the crystal report in my machine it works perfectly, and displays the results wanted, but when I publish the app an employ it in the client machine, it triggers this error :
CrystalDecision.CrystalReports.Engine.ReportDocument.cctor()
I have added this dlls :
CrystalDecision.crystalReport.engine;
CrystalDecision.ReportSource;
CrystalDecision.shared;
CrystalDecision.Windows.Forms;
CrystalDecision.web;
Microsoft.reportViewer.Common;
Microsoft.ReportViewer.WebForm/WinForms;
And using this code to call the report
ReportDocument cr = new ReportDocument();
cr.Load(Path.Combine(Application.ExecutablePath, "REPORT", "horsEtude.rpt"));
cr.SetDataSource(o.dt);
crystalReportViewer1.ReportSource = cr;
crystalReportViewer1.Refresh();
the REPORT folder is in the BIN/DEBUG folder
I have changed copyLocals to True
the version of my DLLs is 13.0.2000.0 and I am using Visual stuio 2010
I have tried a million solution, but still triggers that exception
I also instal Microsoft ReportViewer 2010 Redistibuable and Microsoft .NET 4.6
Framework in the client machine
The publish method that I use is that I create a Setup Project, I add my existing project, and I a a project output, I build the solution and copy the setup.exe from the ebug folder.
Please I need your HELP, I have tried every possible tutorial on the web, but still no chance.
I hope I explained the issue clearly. Thank you
What I have tried:
A million tutorials throughout the web